Open lemind opened 7 years ago
@lemind I had the same issue in my project. I can't repeat this issue in your project because I get an error when I run npm install
:
WARNING in ./~/@angular/core/src/linker/system_js_ng_module_factory_loader.js
45:15 Critical dependency: the request of a dependency is an expression
WARNING in ./~/@angular/core/src/linker/system_js_ng_module_factory_loader.js
57:15 Critical dependency: the request of a dependency is an expression
ERROR in [default] d:\web\sites\angular2-redux-example\shims\shims_for_IE.ts:3:0
Cannot find name 'require'.
ERROR in [default] d:\web\sites\angular2-redux-example\shims\shims_for_IE.ts:4:0
Cannot find name 'require'.
ERROR in [default] d:\web\sites\angular2-redux-example\shims\shims_for_IE.ts:5:0
Cannot find name 'require'.
ERROR in [default] d:\web\sites\angular2-redux-example\src\app\sample-app.ts:28:
12
Cannot find name 'require'.
ERROR in [default] d:\web\sites\angular2-redux-example\src\app\sample-app.ts:29:
12
Cannot find name 'require'.
ERROR in [default] d:\web\sites\angular2-redux-example\src\components\logo\logo.
component.ts:5:11
Cannot find name 'require'.
ERROR in [default] d:\web\sites\angular2-redux-example\src\components\logo\logo.
component.ts:17:22
Cannot find name 'require'.
ERROR in [default] d:\web\sites\angular2-redux-example\src\components\modal\moda
l-content.component.ts:5:11
Cannot find name 'require'.
ERROR in [default] d:\web\sites\angular2-redux-example\src\components\modal\moda
l.component.ts:5:11
Cannot find name 'require'.
ERROR in [default] d:\web\sites\angular2-redux-example\src\index.ts:13:2
Cannot find name 'require'.
ERROR in [default] d:\web\sites\angular2-redux-example\src\store\index.ts:7:21
Cannot find name 'require'.
ERROR in [default] d:\web\sites\angular2-redux-example\src\store\index.ts:8:21
Cannot find name 'require'.
Child html-webpack-plugin for "index.html":
+ 1 hidden modules
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "D:\\dev\\nodejs\\node.exe" "D:\\dev\\nodejs\\node_modules\\npm\\b
in\\npm-cli.js" "run" "build"
npm ERR! node v7.0.0
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! angular2-redux-example@0.2.0 build: `cross-env NODE_ENV=production webp
ack`
I don't know the cause of the error in your case. In my case, the problem is in angular used in Redux ng2-forms. If I remove node_modules/ng2-redux-form/node_modules/@angular
then everything works fine. Maybe the problem is in angular versions. In my project angular version is 2.1.2, in ng2-redux-form/node_modules/@angular version
is 2.0.0. But I see that your project uses angular@2.0.0
This is usually related to the fragile dependency tree. I've pushed a PR recently for angular2-redux-starter that works really well with the latest ng2-redux-form. You might want to check that out =]
@lemind try again with angular2 lastest and ng2-redux-form lastest I was having the same issue after some upgrade and new it's fixed
I tryed use ng2-redux-form with angular2-redux-example but I got error. May be I do something wrong. Could you check it? You could check it this