Error While npm run build.prod
npm run build.dev works fine but, production compilation fails with following output:
[16:11:51] Starting 'build.prod'...
[16:11:51] Starting 'clean.prod'...
[16:11:51] Deleted dist/prod
[16:11:51] Deleted dist/tmp
[16:11:51] Finished 'clean.prod' after 4.9 ms
[16:11:51] Starting 'tslint'...
[16:11:53] Finished 'tslint' after 1.97 s
[16:11:53] Starting 'css-lint'...
/home/user1/IdeaProjects/hr/frontend/node_modules/stylelint/dist/utils/configurationError.js:8
var err = new Error(text);
^
Error: No configuration found
at exports.default (/home/user1/IdeaProjects/hr/frontend/node_modules/stylelint/dist/utils/configurationError.js:8:13)
at /home/user1/IdeaProjects/hr/frontend/node_modules/stylelint/dist/buildConfig.js:43:54
npm ERR! Linux 3.16.0-77-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/local/bin/npm" "run" "build.prod"
npm ERR! node v6.3.1
npm ERR! npm v3.8.5
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build.prod: `gulp build.prod --color --config-env prod`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build.prod script 'gulp build.prod --color --config-env prod'.
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 --config-env prod
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! /home/user1/IdeaProjects/hr/frontend/npm-debug.log
user1@dcomp:~/IdeaProjects/hr/frontend$
Can't reproduce, just tested fresh build.
@dimitrichkhartishvili make sure the file tools/env/prod.ts exists. Are you using clean clone of the seed?
after cloning master repo build.prod succeed. Thanks !
Starting 'build.prod'...
[11:23:20] Starting 'clean.prod'...
[11:23:21] Deleted dist/prod
[11:23:21] Deleted dist/tmp
[11:23:21] Finished 'clean.prod' after 570 ms
[11:23:21] Starting 'tslint'...
[11:23:23] Finished 'tslint' after 1.98 s
[11:23:23] Starting 'css-lint'...
src/client/css/main.css
32:3 âš Unexpected longhand value '10px 0 0 0' instead of '10px 0 0' (shorthand-property-no-redundant-values) [stylelint]
src/client/app/+about/about.component.css
1:1 âš Unexpected unknown pseudo-class selector ":host" (selector-pseudo-class-no-unknown) [stylelint]
src/client/app/+home/home.component.css
1:1 âš Unexpected unknown pseudo-class selector ":host" (selector-pseudo-class-no-unknown) [stylelint]
src/client/app/shared/navbar/navbar.component.css
1:1 âš Unexpected unknown pseudo-class selector ":host" (selector-pseudo-class-no-unknown) [stylelint]
src/client/app/shared/toolbar/toolbar.component.css
1:1 âš Unexpected unknown pseudo-class selector ":host" (selector-pseudo-class-no-unknown) [stylelint]
17:1 âš Unexpected unknown type selector "more" (selector-type-no-unknown) [stylelint]
[11:23:24] Finished 'css-lint' after 643 ms
[11:23:24] Starting 'build.assets.prod'...
[11:23:24] Finished 'build.assets.prod' after 52 ms
[11:23:24] Starting 'build.html_css'...
[11:23:24] Finished 'build.html_css' after 278 ms
[11:23:24] Starting 'copy.js.prod'...
[11:23:24] Finished 'copy.js.prod' after 20 ms
[11:23:24] Starting 'build.js.prod'...
[11:23:26] Finished 'build.js.prod' after 1.51 s
[11:23:26] Starting 'build.bundles'...
[11:23:27] Finished 'build.bundles' after 1.02 s
[11:23:27] Starting 'build.bundles.app'...
[11:23:34] Finished 'build.bundles.app' after 7.26 s
[11:23:34] Starting 'build.index.prod'...
[11:23:34] gulp-inject 2 files into index.html.
[11:23:34] gulp-inject 1 files into index.html.
[11:23:34] Finished 'build.index.prod' after 42 ms
[11:23:34] Finished 'build.prod' after 13 s
I am possibly facing the same issue. Also only when I am running build.prod. The output is quite the same. Using clean build. Tried cloning master branch taking build from the site.
/Users/DmitryGr/Downloads/alfabank-proj/client/node_modules/stylelint/dist/utils/configurationError.js:8
var err = new Error(text);
^
Error: No configuration found
at exports.default (/Users/DmitryGr/Downloads/alfabank-proj/client/node_modules/stylelint/dist/utils/configurationError.js:8:13)
at /Users/DmitryGr/Downloads/alfabank-proj/client/node_modules/stylelint/dist/buildConfig.js:43:54
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build.prod"
npm ERR! node v6.4.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build.prod: `gulp build.prod --color --config-env prod`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build.prod script 'gulp build.prod --color --config-env prod'.
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 --config-env prod
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/DmitryGr/Downloads/alfabank-proj/client/npm-debug.log
I also faced the same issue and the problem was that I didn't have the 'hidden' .stylelintrc file in my project. Copying that file from the original angular2-seed project fixed the problem.
juusor solution worked for us on older seed (RC3), here is the doc for adding .stylelintrc http://stylelint.io/user-guide/configuration/