When i run "npm run dev" it works like a charm, but when i start "npm run dev", this is what happens. I have parcel,sass and yeoman.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! parcel-sass-boilerplate#1.0.0 build: `parcel build src/index.html`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the parcel-sass-boilerplate#1.0.0 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\nikok\AppData\Roaming\npm-cache\_logs\2021-09-28T07_20_11_855Z-debug.log
Add --no-minify into script like this:
"build": "parcel build src/index.html --no-minify"
Related
I have created a project in Laravel 8, and when I run npm run dev it throws the following error:
ERROR in ./resources/sass/app.scss (./node_modules/css-loader??ref--5-2!./node_modules/postcss-loader/src??postcss0!./node_modules/resolve-url-loader??ref--5-4!./node_modules/sass-loader/dist/cjs.js??ref--5-5!./resources/sass/app.scss)
Module build failed (from ./node_modules/postcss-loader/src/index.js):
Error: Failed to find '~#fortawesome/fontawesome-pro/css/all.min.css'
in [
/Users/me/Laravel/<projectName>/resources/sass
]
at resolveModule.catch.catch (/Users/me/Laravel/<projectName>/node_modules/postcss-import/lib/resolve-id.js:35:13)
at <anonymous>
# ./resources/sass/app.scss 2:14-253
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! # development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the # development 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! /Users/me/.npm/_logs/2020-12-30T08_24_47_410Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! # dev: `npm run development`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the # dev 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! /Users/me/.npm/_logs/2020-12-30T08_24_47_441Z-debug.log
My resources/sass/app.scss looks like this:
#import '~#fortawesome/fontawesome-pro/css/all.min.css';
I've tried with #import 'node_modules/#fortawesome/fontawesome-pro/css/all.min.css' as well, but that doesn't work either.
I can see all.min.css in the tree when I follow the path node_modules/#fortawesome/fontawesome-pro/css/all.min.css so I know for a fact that it's there.
Any help would be appreciated
You need to remove the ~ before the import line:
#import '#fortawesome/fontawesome-pro/css/all.min.css';
I have this in my script
"scripts": {
"start": "webpack",
"compile": "tsc -p tsconfig.sequences.json",
"build": "npm-run-all -p compile start",
But getting this error message
sh: npm-run-all: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! workshop4#1.0.0 build: `npm-run-all -p compile start`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the workshop4#1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I have version 6.13.4 npm and node 12.14
You probably did not installed npm-run-all properly.
I would suggest to ensure you installed it locally with:
npm i -s npm-run-all
You then should be able to use it in npm-scripts.
See this answer for more context on how to use commands from npm modules depending on the way you installed them:
https://stackoverflow.com/a/65773947/3612177
Getting below error when running command npm install cypress --save-dev
npm ERR! path C:\Windows\system32\cmd.exe;BrowserServers\chromedriver.exe
npm ERR! errno ENOENT
npm ERR! cypress#4.12.1 postinstall: node index.js --exec install
npm ERR! spawn C:\Windows\system32\cmd.exe;BrowserServers\chromedriver.exe ENOENT
npm ERR!
npm ERR! Failed at the cypress#4.12.1 postinstall 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\Admin\AppData\Roaming\npm-cache_logs\2020-08-07T12_33_09_219Z-debug.log
NOTE : Have run npm-init and package.json is created
node -v
v12.18.3
npm -v
6.14.6
also have set NODE_HOME Env variable
check you using Node.js 8 and above
The system cannot find the path specified.
events.js:183
throw er; // Unhandled 'error' event
^
Error: spawn node_modules\webpack\bin\webpack.js ENOENT
at notFoundError (D:\xampp\htdocs\learnlarvel\node_modules\cross-spawn\lib\enoent.js:6:26)
at verifyENOENT (D:\xampp\htdocs\learnlarvel\node_modules\cross-spawn\lib\enoent.js:40:16)
at ChildProcess.cp.emit (D:\xampp\htdocs\learnlarvel\node_modules\cross-spawn\lib\enoent.js:27:25)
at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # development: cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # development 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\iSkylarTechnology\AppData\Roaming\npm-cache_logs\2019-09-14T11_40_34_967Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # dev: npm run development
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # dev 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\iSkylarTechnology\AppData\Roaming\npm-cache_logs\2019-09-14T11_40_35_155Z-debug.log
Delete your node_modules folder and delete package-lock.json. Run npm cache clear --force and then npm install. Then try npm run dev or npm run watch.
when i am converting angular project to universal. webpack is installed automatically then when i'm trying to build for ssr it is showing message that webpack-cli and webpack-command both are installed. then i uninstalled one of then still it is not working. also node dist/server command is not recognized by angular-cli.
please help..
I tried to uninstall webpack-cli.
× 「webpack」: Flags were specified that were not recognized:
--colors Not sure what you mean there
Please check the command executed.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sample-project#0.0.0 compile:server: webpack --config webpack.server.config.js --progress --colors
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sample-project#0.0.0 compile:server 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\gpw\AppData\Roaming\npm-cache_logs\2019-06-13T05_17_21_908Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sample-project#0.0.0 build:ssr: npm run build:client-and-server-bundles && npm run compile:server
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sample-project#0.0.0 build:ssr 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\gpw\AppData\Roaming\npm-cache_logs\2019-06-13T05_17_21_995Z-debug.log