Angular2 build process not running
I am trying to create a https://github.com/angular/angular wizard as described in follow steps . When I gulp build.js I get this error:
gulp build.js
Dart SDK detected
[20:10:31] Using gulpfile ~/dvl/mongo/angular2/gulpfile.js
[20:10:31] Starting 'build/clean.js'...
[20:10:31] Starting 'build/clean.tools'...
[20:10:31] Finished 'build/clean.tools' after 1.34 ms
[20:10:31] Starting 'build.tools'...
[20:10:31] Starting '!build.tools'...
[20:10:31] Finished 'build/clean.js' after 174 ms
[20:10:31] Starting 'build.js.dev'...
[20:10:31] Starting 'build/clean.tools'...
[20:10:31] Finished 'build/clean.tools' after 853 μs
tools/broccoli/angular_builder.ts(1,16): error TS2304: Cannot find name 'require'.
[20:10:33] '!build.tools' errored after 1.82 s
[20:10:33] TypeScript error: tools/broccoli/angular_builder.ts(1,16): error TS2304: Cannot find name 'require'.
at Output.getError (/home/me/dvl/mongo/angular2/node_modules/gulp-typescript/release/output.js:191:19)
at Output.diagnostic (/home/me/dvl/mongo/angular2/node_modules/gulp-typescript/release/output.js:238:25)
at ProjectCompiler.inputDone (/home/me/dvl/mongo/angular2/node_modules/gulp-typescript/release/compiler.js:60:33)
at CompileStream.end (/home/me/dvl/mongo/angular2/node_modules/gulp-typescript/release/main.js:52:31)
at DestroyableTransform.onend (/home/me/dvl/mongo/angular2/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:523:10)
at DestroyableTransform.g (events.js:199:16)
at DestroyableTransform.emit (events.js:129:20)
at /home/me/dvl/mongo/angular2/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:965:16
at process._tickCallback (node.js:355:11)
[20:10:33] 'build.tools' errored after 1.82 s
[20:10:33] Error: [object Object]
at formatError (/opt/npm-global/lib/node_modules/gulp/bin/gulp.js:169:10)
at Gulp.<anonymous> (/opt/npm-global/lib/node_modules/gulp/bin/gulp.js:195:15)
at Gulp.emit (events.js:129:20)
at Gulp.Orchestrator._emitTaskDone (/home/me/dvl/mongo/angular2/node_modules/gulp/node_modules/orchestrator/index.js:264:8)
at /home/me/dvl/mongo/angular2/node_modules/gulp/node_modules/orchestrator/index.js:275:23
at finish (/home/me/dvl/mongo/angular2/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8)
at cb (/home/me/dvl/mongo/angular2/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:29:3)
at finish (/home/me/dvl/mongo/angular2/node_modules/run-sequence/index.js:53:5)
at Gulp.onError (/home/me/dvl/mongo/angular2/node_modules/run-sequence/index.js:60:4)
at Gulp.emit (events.js:129:20)
[20:10:33] 'build.js.dev' errored after 1.65 s
[20:10:33] Error: [object Object]
at formatError (/opt/npm-global/lib/node_modules/gulp/bin/gulp.js:169:10)
at Gulp.<anonymous> (/opt/npm-global/lib/node_modules/gulp/bin/gulp.js:195:15)
at Gulp.emit (events.js:129:20)
at Gulp.Orchestrator._emitTaskDone (/home/me/dvl/mongo/angular2/node_modules/gulp/node_modules/orchestrator/index.js:264:8)
at /home/me/dvl/mongo/angular2/node_modules/gulp/node_modules/orchestrator/index.js:275:23
at finish (/home/me/dvl/mongo/angular2/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8)
at cb (/home/me/dvl/mongo/angular2/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:29:3)
at finish (/home/me/dvl/mongo/angular2/node_modules/run-sequence/index.js:53:5)
at Gulp.onError (/home/me/dvl/mongo/angular2/node_modules/run-sequence/index.js:60:4)
at Gulp.emit (events.js:129:20)
[20:10:33] 'build.js.dev' errored after 1.65 s
[20:10:33] Error: [object Object]
at formatError (/opt/npm-global/lib/node_modules/gulp/bin/gulp.js:169:10)
at Gulp.<anonymous> (/opt/npm-global/lib/node_modules/gulp/bin/gulp.js:195:15)
at Gulp.emit (events.js:129:20)
at Gulp.Orchestrator._emitTaskDone (/home/me/dvl/mongo/angular2/node_modules/gulp/node_modules/orchestrator/index.js:264:8)
at /home/me/dvl/mongo/angular2/node_modules/gulp/node_modules/orchestrator/index.js:275:23
at finish (/home/me/dvl/mongo/angular2/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8)
at cb (/home/me/dvl/mongo/angular2/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:29:3)
at finish (/home/me/dvl/mongo/angular2/node_modules/run-sequence/index.js:53:5)
at Gulp.onError (/home/me/dvl/mongo/angular2/node_modules/run-sequence/index.js:60:4)
at Gulp.emit (events.js:129:20)
tools/broccoli/angular_builder.ts(2,11): error TS2304: Cannot find name 'require'.
tools/broccoli/angular_builder.ts(3,23): error TS2304: Cannot find name 'require'.
tools/broccoli/angular_builder.ts(4,20): error TS2304: Cannot find name 'require'.
tools/broccoli/angular_builder.ts(5,20): error TS2304: Cannot find name 'require'.
tools/broccoli/angular_builder.ts(6,12): error TS2304: Cannot find name 'require'.
tools/broccoli/angular_builder.ts(7,22): error TS2304: Cannot find name 'require'.
I don't have a protractor and Chrome Canary, but I don't think they are related. At least a few weeks ago he was building fine without them.
I also tried to put require ('typescript -require'); ( https://github.com/eknkc/typescript-require ) in the gulpfile here and there, but wihout any success.
So, your help is greatly appreciated.
source to share
thanks to @ s.Daniel for help, I summarize all my problems with building angular2 on win machine:
1.install bauer dependency
Run bower install
as root If you see an error like this
bower angular#1.0.6 ENOGIT git is not installed or not in the PATH
, then you need to specify the Path environment variable as follows:
set PATH=%PATH%;C:\Program Files\Git\bin
replace the path with your folder path git.exe
.
2.From your local repo go to the folder angular\tools
and run the following commands from here:
to install the tool dependencies,
npm install
tsd install
Without these commands, you should see an error like this:
error TS2304: Cannot find name 'promise' or error TS2304: Cannot find name 'require' or whatever it looking for.
3. From your local repo root, navigate to the folder angular\modules\angular2
and run the same command from step 2.
npm install
tsd install
Without running this command, there are errors like this: Error:
[DiffingTSCompiler]: Typescript found the following errors:
angular2/manual_typings/globals.d.ts (8, 42): Cannot find name 'Promise'
...
source to share