Production Build: css lint:
This is what I get when I run : npm run build.prod
npm ERR! Darwin 15.0.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build.prod" npm ERR! node v5.7.1 npm ERR! npm v3.8.7 npm ERR! code ELIFECYCLE npm ERR! [email protected] build.prod: 'gulp build.prod --color'
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build.prod script 'gulp build.prod --color'.
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 angular2-seed package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! gulp build.prod --color
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular2-seed
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular2-seed
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/mszczepaniak/Development/AmpioCloudReg/npm-debug.log'
When I comment out gulp task css-lint, it works, but then It does not work on the production website.
npm-debug-log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run',
1 verbose cli 'build.prod' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild.prod', 'build.prod', 'postbuild.prod' ]
5 info lifecycle [email protected]~prebuild.prod: [email protected]
6 silly lifecycle [email protected]~prebuild.prod: no script for prebuild.prod, continuing
7 info lifecycle [email protected]~build.prod: [email protected]
8 verbose lifecycle [email protected]~build.prod: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~build.prod: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/mszczepaniak/Development/AmpioCloudReg/node_modules/.bin:/usr/local/bin:/usr/local/opt/coreutils/libexec/gnubin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin
10 verbose lifecycle [email protected]~build.prod: CWD: /Users/mszczepaniak/Development/AmpioCloudReg
11 silly lifecycle [email protected]~build.prod: Args: [ '-c', 'gulp build.prod --color' ]
12 silly lifecycle [email protected]~build.prod: Returned: code: 1 signal: null
13 info lifecycle [email protected]~build.prod: Failed to exec build.prod script
14 verbose stack Error: [email protected] build.prod: `gulp build.prod --color`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:244:16)
14 verbose stack at emitTwo (events.js:100:13)
14 verbose stack at EventEmitter.emit (events.js:185:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
14 verbose stack at emitTwo (events.js:100:13)
14 verbose stack at ChildProcess.emit (events.js:185:7)
14 verbose stack at maybeClose (internal/child_process.js:827:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid [email protected]
16 verbose cwd /Users/mszczepaniak/Development/AmpioCloudReg
17 error Darwin 15.0.0
18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build.prod"
19 error node v5.7.1
20 error npm v3.8.7
21 error code ELIFECYCLE
22 error [email protected] build.prod: `gulp build.prod --color`
22 error Exit status 1
23 error Failed at the [email protected] build.prod script 'gulp build.prod --color'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the angular2-seed package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error gulp build.prod --color
23 error You can get information on how to open an issue for this project with:
23 error npm bugs angular2-seed
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls angular2-seed
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
Hi @mszczepaniak, where is your current local git repositories HEAD at? I tried to reproduce your problem based on the latest commit https://github.com/mgechev/angular2-seed/commit/2df9848bf67889282977607953da1ec633c32a1e and for me it runs fine:
# DonDope @ DonDope-MacBook in ~/Development/GitHub/TheDonDope/angular2-seed on git:master o [16:31:17]
$ npm run build.prod
> [email protected] build.prod /Users/DonDope/Development/GitHub/TheDonDope/angular2-seed
> gulp build.prod --color
[16:31:21] Requiring external module ts-node/register
[16:31:25] Loading tasks folder /Users/DonDope/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/build.assets.dev
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/build.assets.prod
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/build.bundles.app
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/build.bundles
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/build.docs
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/build.html_css
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/build.index.dev
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/build.index.prod
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/build.js.dev
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/build.js.e2e
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/build.js.prod
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/build.js.test
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/build.js.tools
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/check.versions
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/clean.all
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/clean.dev
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/clean.prod
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/clean.tools
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/copy.js.prod
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/css-lint
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/e2e
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/generate.manifest
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/karma.start
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/serve.coverage
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/serve.docs
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/server.prod
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/server.start
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/tslint
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/watch.dev
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/watch.e2e
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/watch.test
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/seed/webdriver
[16:31:25] Loading tasks folder /Users/DonDope/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/project
[16:31:25] Registering task ~/Development/GitHub/TheDonDope/angular2-seed/tools/tasks/project/sample.task
[16:31:25] Using gulpfile ~/Development/GitHub/TheDonDope/angular2-seed/gulpfile.ts
[16:31:25] Starting 'build.prod'...
[16:31:25] Starting 'clean.prod'...
[16:31:25] Deleted dist/prod
[16:31:25] Deleted dist/tmp
[16:31:25] Finished 'clean.prod' after 13 ms
[16:31:25] Starting 'tslint'...
[16:31:28] Finished 'tslint' after 3.06 s
[16:31:28] Starting 'css-lint'...
[16:31:30] Finished 'css-lint' after 1.68 s
[16:31:30] Starting 'build.assets.prod'...
[16:31:30] Finished 'build.assets.prod' after 87 ms
[16:31:30] Starting 'build.html_css'...
[16:31:31] Finished 'build.html_css' after 751 ms
[16:31:31] Starting 'copy.js.prod'...
[16:31:31] Finished 'copy.js.prod' after 42 ms
[16:31:31] Starting 'build.js.prod'...
[16:31:34] Finished 'build.js.prod' after 3.24 s
[16:31:34] Starting 'build.bundles'...
[16:31:37] Finished 'build.bundles' after 2.49 s
[16:31:37] Starting 'build.bundles.app'...
[16:31:50] Finished 'build.bundles.app' after 13 s
[16:31:50] Starting 'build.index.prod'...
[16:31:50] gulp-inject 2 files into index.html.
[16:31:50] gulp-inject 1 files into index.html.
[16:31:50] Finished 'build.index.prod' after 85 ms
[16:31:50] Finished 'build.prod' after 24 s
You could try the following:
- Clean the
distdirectory:$ rm -rf dist - Clean the
typingsdirectory:$ rm -rf typings - Clean the
node_modulesdirectory:$ rm -rf node_modules - Clean the
coveragedirectory:$ rm -rf coverage - Reinstall everything:
$ npm install - Retry:
$ npm run build.prod
Greetings
Dope
@mszczepaniak can't reproduce it with latest master neither. Can you verify that it works now?
The newest commit builds, but I still get an error when I put the dist->prod folder on the server:
Your base path seems wrong. The entire application is under the test directory not in the root.
This is the desired behavior of the seed, you need to configure the used based directory.