-
Notifications
You must be signed in to change notification settings - Fork 2.2k
npm run build fails on Windows #1799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
remove your node_modules then try to run |
I believe we need to do some work to make our tooling Windows friendly. |
yeah, forgot it, I build successful on Mac. it must be Window problem |
Thanks for the effort if you work on that. I tried to rebuild from scratch, but same result. |
Do you have any update on this ? I could work from times to times to contribute to the project, but for now, I can't. I'd be glad to contribute. |
Try these changes. package.json "build": "rimraf dist && node tools/build.js", tools\build.js // Constants for running typescript commands
const TSC = 'node_modules\\.bin\\tsc.cmd';
const NGC = 'node_modules\\.bin\\ngc.cmd'; |
Hi @tja4472 , thanks. It did the trick! I had no more errors for the I think i'm now able to contribute, even on windows. Not sure how to propose PR because of the necessary changes to |
As suggested in #1799 (comment)
As suggested in #1799 (comment)
As suggested in #1799 (comment)
My initial intention was to contribute by submitting a PR. But, I ran into some issues on some points which are needed to do so:
Version info
Angular: 6.1
Firebase: 3.17.4
AngularFire: 5.0-rc.11
node: 9.5.0
Other (e.g. Ionic/Cordova, Node, browser, operating system): no
My OS: windows 10**
Steps to set up and reproduce
npm run build
fails directly.Debug output
** Errors in the JavaScript console **
jct@CFLX-22 MINGW64 ~/code/16-angularfire2/angularfire2 (master)
$ npm test
events.js:137
throw er; // Unhandled 'error' event
^
Error: spawn node_modules/.bin/ngc ENOENT
at _errnoException (util.js:1003:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:201:19)
at onErrorNT (internal/child_process.js:389:16)
at process._tickCallback (internal/process/next_tick.js:152:19)
at Function.Module.runMain (module.js:703:11)
at startup (bootstrap_node.js:190:16)
at bootstrap_node.js:662:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build:
rm -rf dist && node tools/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\jct\AppData\Roaming\npm-cache_logs\2018-07-31T09_58_56_550Z-debug.log
npm ERR! Test failed. See above for more details.
jct@CFLX-22 MINGW64 ~/code/16-angularfire2/angularfire2 (master)
$ ng version
Angular CLI: 6.0.0
Node: 9.5.0
OS: win32 x64
Angular: 6.1.0
... common, compiler, compiler-cli, core, platform-browser
... platform-browser-dynamic, platform-server
Package Version
@angular-devkit/architect 0.6.0 (cli-only)
@angular-devkit/core 0.6.0 (cli-only)
@angular-devkit/schematics 0.6.0 (cli-only)
@schematics/angular 0.6.0 (cli-only)
@schematics/update 0.6.0 (cli-only)
rxjs 6.2.2
typescript 2.7.2
jct@CFLX-22 MINGW64 ~/code/16-angularfire2/angularfire2 (master)
$ firebase --version
3.17.4
jct@CFLX-22 MINGW64 ~/code/16-angularfire2/angularfire2 (master)
$ node -version
C:\Program Files\nodejs\node.exe: bad option: -version
jct@CFLX-22 MINGW64 ~/code/16-angularfire2/angularfire2 (master)
$ node -v
v9.5.0
Expected behavior
It should run ngc command in node_modules/.bin/ngc, but does not.
Actual behavior
It fails as the log indicates.
Is there anything that I did wrong ? I just followed what was indicated on the CONTRIBUTING.md page.
The text was updated successfully, but these errors were encountered: