generator-gulp-angular2 icon indicating copy to clipboard operation
generator-gulp-angular2 copied to clipboard

Error when build.dev

Open janbaer opened this issue 9 years ago • 4 comments

I just installed your generator. But when I called the build task I get this error:

Error: Error loading "rx" at file:/Users/jan/temp/angular2/node_modules/angular2/node_modules/rx/dist/rx.js

and the rx.js really doesn't exists. Can you reproduce the error? Can you fix it? Thanks!

janbaer avatar Nov 09 '15 20:11 janbaer

+1. Seems like a missing dependency or reference to old Angular to me

[18:26:40] Error: Error loading "rx" at file: .../web-app/node_modules/angular2/node_modules/rx/dist/rx.js
Error loading "rx" from "angular2/router" at file: .../web-app/node_modules/angular2/es6/dev/router.js
Error loading "rx" at file: .../web-app/node_modules/angular2/node_modules/rx/dist/rx.js
Error loading "rx" from "angular2/angular2" at file: .../web-app/node_modules/angular2/es6/dev/angular2.js
ENOENT: no such file or directory, open '...\web-app\node_modules\angular2\node_modules\rx\dist\rx.js'

kgusarov avatar Nov 12 '15 16:11 kgusarov

npm install --save rx

Fixed it for me, so it seems to be a missing dependency. It seems angular2 is using rx for RFC (Reactive Functional Programming).

gkTim avatar Nov 16 '15 17:11 gkTim

same problem here, solved after npm install --save rx

universalien avatar Nov 23 '15 01:11 universalien

It was the same error(node: v5.0.0):

$ gulp serve.dev
[11:07:37] Using gulpfile ~/Sandbox/gangular2/gulpfile.js
[11:07:37] Starting 'build.dev'...
[11:07:37] Starting 'clean.dev'...
[11:07:37] Starting 'livereload'...
[11:07:37] Finished 'livereload' after 2.57 ms
[11:07:37] Finished 'clean.dev' after 9.84 ms
[11:07:37] Starting 'build.ng2.dev'...
[11:07:38] 'build.ng2.dev' errored after 1.22 s
[11:07:38] Error: Error loading "@reactivex/rxjs/dist/cjs/Rx" at file:/Users/albatrosary/Sandbox/gangular2/@reactivex/rxjs/dist/cjs/Rx.js
Error loading "@reactivex/rxjs/dist/cjs/Rx" from "angular2/angular2" at file:/Users/albatrosary/Sandbox/gangular2/node_modules/angular2/es6/dev/angular2.js
Error loading "@reactivex/rxjs/dist/cjs/Rx" at file:/Users/albatrosary/Sandbox/gangular2/@reactivex/rxjs/dist/cjs/Rx.js
Error loading "@reactivex/rxjs/dist/cjs/Rx" from "angular2/router" at file:/Users/albatrosary/Sandbox/gangular2/node_modules/angular2/es6/dev/router.js
ENOENT: no such file or directory, open '/Users/albatrosary/Sandbox/gangular2/@reactivex/rxjs/dist/cjs/Rx.js'
    at Error (native)
[11:07:38] 'build.dev' errored after 1.24 s
[11:07:38] Error in plugin 'run-sequence'
Message:
    An error occured in task 'build.ng2.dev'.

Next npm install --save rx but error.

$ npm install --save rx
[email protected] /Users/albatrosary/Sandbox/gangular2
├─┬ [email protected]
│ └─┬ [email protected]
│   └── [email protected] 
├── [email protected] 
└─┬ [email protected]
  └─┬ [email protected]
    └── [email protected] 

npm WARN EPACKAGEJSON [email protected] No description
npm WARN EPACKAGEJSON [email protected] No repository field.
npm WARN EPACKAGEJSON [email protected] No license field.
$ gulp serve.dev
[11:09:12] Using gulpfile ~/Sandbox/gangular2/gulpfile.js
[11:09:12] Starting 'build.dev'...
[11:09:12] Starting 'clean.dev'...
[11:09:12] Starting 'livereload'...
[11:09:12] Finished 'livereload' after 2.49 ms
[11:09:12] Finished 'clean.dev' after 9.92 ms
[11:09:12] Starting 'build.ng2.dev'...
[11:09:14] 'build.ng2.dev' errored after 1.27 s
[11:09:14] Error: Error loading "@reactivex/rxjs/dist/cjs/Rx" at file:/Users/albatrosary/Sandbox/gangular2/@reactivex/rxjs/dist/cjs/Rx.js
Error loading "@reactivex/rxjs/dist/cjs/Rx" from "angular2/angular2" at file:/Users/albatrosary/Sandbox/gangular2/node_modules/angular2/es6/dev/angular2.js
Error loading "@reactivex/rxjs/dist/cjs/Rx" at file:/Users/albatrosary/Sandbox/gangular2/@reactivex/rxjs/dist/cjs/Rx.js
Error loading "@reactivex/rxjs/dist/cjs/Rx" from "angular2/router" at file:/Users/albatrosary/Sandbox/gangular2/node_modules/angular2/es6/dev/router.js
ENOENT: no such file or directory, open '/Users/albatrosary/Sandbox/gangular2/@reactivex/rxjs/dist/cjs/Rx.js'
    at Error (native)
[11:09:14] 'build.dev' errored after 1.29 s
[11:09:14] Error in plugin 'run-sequence'
Message:
    An error occured in task 'build.ng2.dev'.

albatrosary avatar Dec 01 '15 02:12 albatrosary