Skip to content
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

gulp erroring out on Windows during 'bundle:spa-dev' task. #13

Closed
ghost opened this issue May 10, 2017 · 12 comments
Closed

gulp erroring out on Windows during 'bundle:spa-dev' task. #13

ghost opened this issue May 10, 2017 · 12 comments
Labels

Comments

@ghost
Copy link

ghost commented May 10, 2017

I'm submitting a ... (check one with "x")

[X ] bug report => check the README and search github for a similar issue or PR before submitting
[ ] support request => check the README and search github for a similar issue or PR before submitting
[ ] feature request

Current behavior
Unable to run any build commands on Windows. Errors out during gulp task 'bundle:spa-dev'

Expected/desired behavior
Expect a successful build.

Minimal reproduction of the problem with instructions

  1. Clone repository
  2. npm/yarn install
  3. npm run build:spa-dev
  4. Error.

Please tell us about your environment:
Windows 10
mintty 2.0.3
node v6.10.3
npm v4.5.0

  • Angular version:
    Latest bundled with repo.
@fulls1z3 fulls1z3 changed the title Gulp erroring out on Windows during 'bundle:spa-dev' task. [invalid] gulp erroring out on Windows during 'bundle:spa-dev' task. May 10, 2017
@fulls1z3
Copy link
Owner

@sam-candeocreative there's no task with name bundle:spa-dev. You should use gulp bundle:spa-dev or better npm run build:spa-dev to build the package on client side in dev mode.

@ghost
Copy link
Author

ghost commented May 10, 2017

@fulls1z3 That is what I put above, is it not?

The gulp task is clearly labeled bundle:spa-dev. The npm run command is build:spa-dev

@ghost
Copy link
Author

ghost commented May 10, 2017

Console output

$ npm run build:spa-dev

> @ng-seed/universal@0.4.0-beta.2 build:spa-dev C:\vhosts\ng
> gulp clean && gulp build:spa-dev

[10:23:09] Using gulpfile C:\vhosts\ng\gulpfile.js
[10:23:09] Starting 'clean'...
[10:23:09] Starting 'clean:public'...
[10:23:09] Finished 'clean:public' after 52 ms
[10:23:09] Starting 'clean:server'...
[10:23:09] Finished 'clean:server' after 2.63 ms
[10:23:09] Starting 'clean:temp'...
[10:23:09] Finished 'clean:temp' after 1.05 ms
[10:23:09] Finished 'clean' after 57 ms
[10:23:10] Using gulpfile C:\vhosts\ng\gulpfile.js
[10:23:10] Starting 'build:spa-dev'...
[10:23:10] Starting 'dummy'...
[10:23:10] Finished 'dummy' after 513 μs
[10:23:10] Starting 'bundle:spa-dev'...
[10:23:12] 'bundle:spa-dev' errored after 1.36 s
[10:23:12] Error: The "@angular/compiler-cli" package was not properly installed.
    at Object.<anonymous> (C:\vhosts\ngcandeo\node_modules\@ngtools\webpack\src\index.js:14:11)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\vhosts\ng\config\webpack.common.js:12:42)
    at Module._compile (module.js:570:32)
[10:23:12] 'build:spa-dev' errored after 1.36 s
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ng-seed/universal@0.4.0-beta.2 build:spa-dev: `gulp clean && gulp build:spa-dev`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ng-seed/universal@0.4.0-beta.2 build:spa-dev script 'gulp clean && gulp build:spa-dev'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the @ng-seed/universal package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     gulp clean && gulp build:spa-dev
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs @ng-seed/universal
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls @ng-seed/universal
npm ERR! There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\-redacted-\AppData\Roaming\npm-cache\_logs\2017-05-10T15_23_12_376Z-debug.log

Log file output:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\-redacted-\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'build:spa-dev' ]
2 info using npm@4.5.0
3 info using node@v6.10.3
4 verbose run-script [ 'prebuild:spa-dev', 'build:spa-dev', 'postbuild:spa-dev' ]
5 info lifecycle @ng-seed/universal@0.4.0-beta.2~prebuild:spa-dev: @ng-seed/universal@0.4.0-beta.2
6 silly lifecycle @ng-seed/universal@0.4.0-beta.2~prebuild:spa-dev: no script for prebuild:spa-dev, continuing
7 info lifecycle @ng-seed/universal@0.4.0-beta.2~build:spa-dev: @ng-seed/universal@0.4.0-beta.2
8 verbose lifecycle @ng-seed/universal@0.4.0-beta.2~build:spa-dev: unsafe-perm in lifecycle true
9 verbose lifecycle @ng-seed/universal@0.4.0-beta.2~build:spa-dev: PATH: C:\Users\-redacted-\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;C:\vhosts\ng\node_modules\.bin;C:\Users\-redacted-\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\-redacted-\bin;C:\Program Files\Oculus\Support\oculus-runtime;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Git\cmd;C:\ProgramData\ComposerSetup\bin;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Windows Live\Shared;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Yarn\bin;C:\HashiCorp\Vagrant\bin;C:\Program Files\nodejs;C:\xampp\apache\bin;C:\xampp\mysql\bin;C:\xampp\php;C:\Users\Cand-redacted-\AppData\Local\atom\bin;C:\Users\-redacted-\AppData\Roaming\Composer\vendor\bin;C:\Users\-redacted-\AppData\Local\Microsoft\WindowsApps;C:\Users\-redacted-\AppData\Local\atom\bin;C:\Users\-redacted-\AppData\Local\Yarn\.bin;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\-redacted-\AppData\Roaming\npm;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
10 verbose lifecycle @ng-seed/universal@0.4.0-beta.2~build:spa-dev: CWD: C:\vhosts\ng
11 silly lifecycle @ng-seed/universal@0.4.0-beta.2~build:spa-dev: Args: [ '/d /s /c', 'gulp clean && gulp build:spa-dev' ]
12 silly lifecycle @ng-seed/universal@0.4.0-beta.2~build:spa-dev: Returned: code: 1  signal: null
13 info lifecycle @ng-seed/universal@0.4.0-beta.2~build:spa-dev: Failed to exec build:spa-dev script
14 verbose stack Error: @ng-seed/universal@0.4.0-beta.2 build:spa-dev: `gulp clean && gulp build:spa-dev`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (C:\Users\-redacted-\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:279:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:191:7)
14 verbose stack     at ChildProcess.<anonymous> (C:\Users\-redacted-\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:191:7)
14 verbose stack     at maybeClose (internal/child_process.js:886:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid @ng-seed/universal@0.4.0-beta.2
16 verbose cwd C:\vhosts\ng
17 verbose Windows_NT 10.0.14393
18 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\-redacted-\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "build:spa-dev"
19 verbose node v6.10.3
20 verbose npm  v4.5.0
21 error code ELIFECYCLE
22 error errno 1
23 error @ng-seed/universal@0.4.0-beta.2 build:spa-dev: `gulp clean && gulp build:spa-dev`
23 error Exit status 1
24 error Failed at the @ng-seed/universal@0.4.0-beta.2 build:spa-dev script 'gulp clean && gulp build:spa-dev'.
24 error Make sure you have the latest version of node.js and npm installed.
24 error If you do, this is most likely a problem with the @ng-seed/universal package,
24 error not with npm itself.
24 error Tell the author that this fails on your system:
24 error     gulp clean && gulp build:spa-dev
24 error You can get information on how to open an issue for this project with:
24 error     npm bugs @ng-seed/universal
24 error Or if that isn't available, you can get their info via:
24 error     npm owner ls @ng-seed/universal
24 error There is likely additional logging output above.
25 verbose exit [ 1, true ]

@ghost ghost changed the title [invalid] gulp erroring out on Windows during 'bundle:spa-dev' task. [invalid] gulp erroring out on Windows during 'build:spa-dev' task. May 10, 2017
@ghost ghost changed the title [invalid] gulp erroring out on Windows during 'build:spa-dev' task. [invalid] gulp erroring out on Windows during 'bundle:spa-dev' task. May 10, 2017
@fulls1z3
Copy link
Owner

@sam-candeocreative it's ok, we all made typo errors (even once I sent money to a wrong account and lost some hundred bucks 😄).

Well, the error explains itself:

Error: The "@angular/compiler-cli" package was not properly installed.

Did you perform npm/yarn install for dependencies before running the build task? Or, maybe you have @angular installed globally. I think installing/resolving dependencies will solve your problem.

Try this solution, and let me know if it now works.

@fulls1z3 fulls1z3 added question and removed invalid labels May 10, 2017
@fulls1z3 fulls1z3 changed the title [invalid] gulp erroring out on Windows during 'bundle:spa-dev' task. [question] gulp erroring out on Windows during 'bundle:spa-dev' task. May 10, 2017
@ghost
Copy link
Author

ghost commented May 10, 2017

@fulls1z3

Yes, hence my confusion.

From my yarn.lock:

"@angular/compiler-cli@~4.1.0":
  version "4.1.1"
  resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-4.1.1.tgz#8cea89ee12129c3f0edb55853e18b37b164f2953"
  dependencies:
    "@angular/tsc-wrapped" "4.1.1"
    minimist "^1.2.0"
    reflect-metadata "^0.1.2"```

@fulls1z3
Copy link
Owner

Did you try to remove whole node_modules and run yarn?

@fulls1z3 fulls1z3 reopened this May 10, 2017
@ghost
Copy link
Author

ghost commented May 10, 2017

Just tried this. No luck - same errors. Also tried yarn upgrade @angular/compiler-cli after with no luck.

@ghost
Copy link
Author

ghost commented May 10, 2017

@fulls1z3 I gave up and resorted to linux subsystem for now. Definitely a bug somewhere with Windows that I can't quite root out right now.

@fulls1z3
Copy link
Owner

@sam-candeocreative actually I'm using Windows but it's better to have some automated builds for this repo both on travis-ci and appveyor. Also, please let me know about the details on this topic, maybe we'll find out a clue.

@fulls1z3
Copy link
Owner

@sam-candeocreative I'd like to share an interesting thing with you. I was trying to remove uglifyjs deps from the package, and deleted the entire uglifyjs dir from node_modules followed by the execution of yarn command. The output was exactly as follows:

$ yarn
yarn install v0.23.4
[1/4] Resolving packages...
success Already up-to-date.
Done in 2.02s.

I saw that yarn tends to do not update anything while the package.json was still the same. I made a small change on package.json and it worked like a charm.

$ yarn
yarn install v0.23.4
[1/4] Resolving packages...
[2/4] Fetching packages...
warning fsevents@1.1.1: The platform "win32" is incompatible with this module.
info "fsevents@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 39.76s.

Try changing a version of any dep or adding/removing a dep and then run yarn and then revert the changes on package.json and then run yarn (what a sentence, lol). Also, please let me know about the status.

@ghost
Copy link
Author

ghost commented May 11, 2017

@fulls1z3 I think you missed yarn upgrade when looking into yarn. yarn upgrade will do what you suggested above, just a little easier. yarn upgrade will rebuild the lockfile that you went through all that effort to invalidate ;)

Anyway, I thought I had tried this yesterday, but maybe I didn't try a general upgrade. It seems to be working fine today :). Of course, after I spent all that effort getting windows linux subsystem up to date.

@fulls1z3
Copy link
Owner

Well I'm glad that it works now :)

@fulls1z3 fulls1z3 self-assigned this May 22, 2017
@fulls1z3 fulls1z3 removed their assignment Aug 10, 2017
@fulls1z3 fulls1z3 changed the title [question] gulp erroring out on Windows during 'bundle:spa-dev' task. gulp erroring out on Windows during 'bundle:spa-dev' task. Sep 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant