concurrently "npm run build:watch" "npm run serve" for angular-quickstart on Mac OS X fails - macos

I followed the instructions on angular.io to setup and run an angular-quickstart (Angular 2) project on Mac OS X 10.12. Unfortunately I get the following error:
% npm start
> angular-quickstart#1.0.0 prestart /Users/will/Documents/Projects/test/angular2-test
> npm run build
> angular-quickstart#1.0.0 build /Users/will/Documents/Projects/test/angular2-test
> tsc -p src/
> angular-quickstart#1.0.0 start /Users/will/Documents/Projects/test/angular2-test
> concurrently "npm run build:watch" "npm run serve"
[0] Unknown option: `-l'
[0] Usage: tcsh [ -bcdefilmnqstvVxX ] [ argument ... ].
[1] Unknown option: `-l'
[1] Usage: tcsh [ -bcdefilmnqstvVxX ] [ argument ... ].
[0] npm run build:watch exited with code 1
[1] npm run serve exited with code 1
npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/Cellar/node/6.2.2/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v6.2.2
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! angular-quickstart#1.0.0 start: `concurrently "npm run build:watch" "npm run serve"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-quickstart#1.0.0 start script 'concurrently "npm run build:watch" "npm run serve"'.
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 angular-quickstart package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! concurrently "npm run build:watch" "npm run serve"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular-quickstart
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular-quickstart
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/will/Documents/Projects/test/angular2-test/npm-debug.log
I read all posts about angular-quickstart and mac unfortunately without finding anything that would help. I did upgrade nodejs and npm and also manually installed "concurrently" although this was probably not the problem. I can start both commands (npm run build:watch and npm run serve) separately and things seem to work ok (code gets automatically compiled on changes and the browser gets updated). So does anyone have an idea what might be the problem here?
Thanks!

Related

Parcel build command throws an error when trying to compile

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"

How do I solve npm run build command not found error?

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 error when running command npm install cypress --save-dev

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

Laravel 5.5 + Vue.js 2.x project not working on npm run dev

when I have created the new project for Laravel 5.5 + Vue.js 2.x , I have the problem. This is the message after I have run this.
npm install
npm run dev
> # dev /Volumes/Work/Work/Vue/CRUD
> npm run development
> # development /Volumes/Work/Work/Vue/CRUD
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
95% emitting
DONE Compiled successfully in 2830ms 6:01:15 PM
internal/child_process.js:325
throw errnoException(err, 'spawn');
^
Error: spawn EACCES
at _errnoException (util.js:1041:11)
at ChildProcess.spawn (internal/child_process.js:325:11)
at exports.spawn (child_process.js:493:9)
at Object.exports.execFile (child_process.js:208:15)
at Object.module.exports.fileCommand (/Volumes/Work/Work/Vue/CRUD/node_modules/node-notifier/lib/utils.js:53:13)
at NotificationCenter.notify (/Volumes/Work/Work/Vue/CRUD/node_modules/node-notifier/notifiers/notificationcenter.js:66:11)
at module.exports.WebpackNotifierPlugin.compilationDone (/Volumes/Work/Work/Vue/CRUD/node_modules/webpack-notifier/index.js:62:18)
at Compiler.applyPlugins (/Volumes/Work/Work/Vue/CRUD/node_modules/tapable/lib/Tapable.js:61:14)
at emitRecords.err (/Volumes/Work/Work/Vue/CRUD/node_modules/webpack/lib/Compiler.js:268:11)
at Compiler.emitRecords (/Volumes/Work/Work/Vue/CRUD/node_modules/webpack/lib/Compiler.js:375:38)
at emitAssets.err (/Volumes/Work/Work/Vue/CRUD/node_modules/webpack/lib/Compiler.js:262:10)
at applyPluginsAsyncSeries1.err (/Volumes/Work/Work/Vue/CRUD/node_modules/webpack/lib/Compiler.js:368:12)
at next (/Volumes/Work/Work/Vue/CRUD/node_modules/tapable/lib/Tapable.js:218:11)
at Compiler.compiler.plugin (/Volumes/Work/Work/Vue/CRUD/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)
at Compiler.applyPluginsAsyncSeries1 (/Volumes/Work/Work/Vue/CRUD/node_modules/tapable/lib/Tapable.js:222:13)
at Compiler.afterEmit (/Volumes/Work/Work/Vue/CRUD/node_modules/webpack/lib/Compiler.js:365:9)
at require.forEach.err (/Volumes/Work/Work/Vue/CRUD/node_modules/webpack/lib/Compiler.js:354:15)
at /Volumes/Work/Work/Vue/CRUD/node_modules/async/dist/async.js:421:16
at iteratorCallback (/Volumes/Work/Work/Vue/CRUD/node_modules/async/dist/async.js:998:13)
at /Volumes/Work/Work/Vue/CRUD/node_modules/async/dist/async.js:906:16
at /Volumes/Work/Work/Vue/CRUD/node_modules/graceful-fs/graceful-fs.js:43:10
at FSReqWrap.oncomplete (fs.js:135:15)
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! /Users/paladin2/.npm/_logs/2017-09-04T08_01_15_242Z-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! /Users/paladin2/.npm/_logs/2017-09-04T08_01_15_321Z-debug.log
Has anybody had the same problem in the past?
giving your user execute rights on node_modules does the trick: chmod -R u+x node_modules/
if npm update doesn't work try installing webpack manually by command.
npm install –save-dev npm-install-webpack-plugin
I had the same issue since this morning and I remembered that I updated my npm version lately.
EVen if I created a new project and ran
npm install && npm run dev
I got the same issue.
A temporary solution for me is/was to downgrade npm:
npm install -g npm#5.3
If I now run npm run dev everything works fine.
that issue cause of permission of that folder, I think.
when I set folder permission like this, all works fine on my computer.
chmod -R 765 [foldername]
Thanks.
I've installed without laragon or Virtual host. Got the same error that cross-env is not found.
After the hours of research I found the solution. Here is how I did:
npm install cross-env -g
npm update
npm install --save
after that npm run dev or npm run build
Boom! Laravel Mix Build Successful it is working.....

Sails.js won't install. Windows

Sails.js will not install, but just to make sure npm is working I installed grunt
npm install -g grunt-cli and it installed correctly.
But when I run npm install -g sails I get an error.
Command prompt error:
`sails#0.11.0 preinstall C:\Users\User\AppData\Roaming\npm\node_modules\sails
node ./lib/preinstall_npmcheck.js
Sails.js Installation - Error
Unable to check your npm-version
Please reinstall npm to use Sails.js
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-
cli.js" "-g" "install" "sails"
npm ERR! node v4.0.0
npm ERR! npm v2.14.2
npm ERR! code ELIFECYCLE
npm ERR! sails#0.11.0 preinstall: node ./lib/preinstall_npmcheck.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sails#0.11.0 preinstall script 'node ./lib/preinstall_npmcheck.js'.
npm ERR! This is most likely a problem with the sails package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./lib/preinstall_npmcheck.js
npm ERR! You can get their info via:
npm ERR! npm owner ls sails
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Windows\system32\npm-debug.log`
npm-debug.log:
https://gist.github.com/anonymous/c850ac8c71e0410db020
I got the same errors.
npm -g install sails
But it worked when I ran command line as administrator.
I solved this by running npm install -g sails --ignore-scripts.
The only thing I can think of is for some reason I don't have ./lib/preinstall_npmcheck.js file and it is trying to run it, so by ignoring it I don't get the error, hence the successful install.
I still don't understand why, but I hope this helps someone.

Resources