ngui icon indicating copy to clipboard operation
ngui copied to clipboard

Module not found react.directive.js

Open marko033 opened this issue 7 years ago • 1 comments

I install package: npm install @ngui/ngui @types/googlemaps @types/hammerjs --save-dev import NguiModule to app.module.ts

and then i get:

Failed to compile.

./~/@ngui/react/dist/react.directive.js Module not found: Error: Can't resolve 'react' in 'C:...\app\node_modules@ngui\react\dist' @ ./~/@ngui/react/dist/react.directive.js 12:12-28 @ ./~/@ngui/react/dist/index.js @ ./~/@ngui/ngui/dist/ngui.module.js @ ./~/@ngui/ngui/dist/index.js @ ./src/app/app.module.ts @ ./src/main.ts @ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts

how can i fix this error?

marko033 avatar Jun 06 '17 05:06 marko033

To anyone else facing this issue, you will have to npm install react. I know it's not something one thinks of when working with an Angular 2 UI library, but react is listed as a dependency. To resolve this issue, run the following command: npm install react react-dom --save

rjusroth avatar Jul 07 '17 19:07 rjusroth