ngui
ngui copied to clipboard
Module not found react.directive.js
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?
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