NgReact give "Error: module 'react' not found from ... ngReact.min.js" in browser, angular project

I am trying to incorporate react into an existing AngularJS project. Found a deck package called ngReact. I added this and reacted to my project using a browser. Runner grunt just give me"Error: module 'react' not found from ..../bower_components/ngReact/ngReact.min.js"

Any ideas?

In my angular-app.js

'use strict';
var di = require('di');
var angular = require('angular');
require('angular-resource');
require('angular-route');
require('bootstrap');
require('angular-bootstrap');
...
require('react');
require('ngReact');

      

In my package .json

"browser":{
    "jquery": "./bower_components/jquery/dist/jquery.js",
    "angular": "./bower_components/angular/angular.js",
    "bootstrap": "./bower_components/bootstrap/dist/js/bootstrap.js",
    "angular-resource": "./bower_components/angular-resource/angular-resource.js",
    "angular-route": "./bower_components/angular-route/angular-route.js",
    "angular-bootstrap": "./bower_components/angular-bootstrap/ui-
    ...
    "react": "./bower_components/react/react.js",
    "ngReact": "./bower_components/ngReact/ngReact.min.js"
}

      

+3


source to share





All Articles