Skip to content

npm run build fails on Windows #1799

Closed
Closed
@johanchouquet

Description

@johanchouquet

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

  • I just forked the repository
  • then I git cloned it.
  • then I npm installed it
  • then, npm run build fails directly.

Debug output

** Errors in the JavaScript console **

jct@CFLX-22 MINGW64 ~/code/16-angularfire2/angularfire2 (master)
$ npm test

[email protected] test C:\Users\jct\code\16-angularfire2\angularfire2
npm run build && karma start --single-run

[email protected] build C:\Users\jct\code\16-angularfire2\angularfire2
rm -rf dist && node tools/build.js

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions