laravel react command run dev not working - reactjs

C:\wamp64\www\want>npm run dev
> # dev C:\wamp64\www\want
> npm run development
> # development C:\wamp64\www\want
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
The system cannot find the path specified.
events.js:167
throw er; // Unhandled 'error' event
^
Error: spawn node_modules\webpack\bin\webpack.js ENOENT
at notFoundError (C:\Users\coolm\AppData\Roaming\npm\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:6:26)
at verifyENOENT (C:\Users\coolm\AppData\Roaming\npm\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:40:16)
at ChildProcess.cp.emit (C:\Users\coolm\AppData\Roaming\npm\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:27:25)
at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
Emitted 'error' event at:
at ChildProcess.cp.emit (C:\Users\coolm\AppData\Roaming\npm\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:30:37)
at Process.ChildProcess._handle.onexit (internal/child_process.js:240: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 WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\coolm\AppData\Roaming\npm-cache\_logs\2018-09-18T16_07_49_646Z-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 WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\coolm\AppData\Roaming\npm-cache\_logs\2018-09-18T16_07_49_686Z-debug.log
C:\wamp64\www\want>
I'm trying to hook up my Laravel application with React. I followed the step of running the command "php artisan preset react" but after I was instructed to run npm install & run dev. I keep getting the following error. Does anyone have a similar problem?

Try doing full reset:
rm -rf node_modules
rm package-lock.json yarn.lock
npm cache clear --force
npm install

Related

cannot setup react-boilerplate on mac M1

when I clone the repository and run this command "npm run start", this error occurs
npm ERR! code 1
npm ERR! path /Users/hf/Downloads/leadbook-test/node_modules/ngrok
npm ERR! command failed
npm ERR! command sh -c node ./postinstall.js
npm ERR! ngrok - platform darwinarm64 is not supported.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/hf/.npm/_logs/2022-03-09T19_45_14_908Z-debug-0.log
Try
npm cache clean --force
After that delete node_modules and package-lock.json
npm install or yarn
npm start or yarn start
Hope this will fix your issue.

gh-pages fails on `run deploy`

GitHub Pages deploy fails and I don't have any idea why.
Already deleted node_modules and reinstalled them.
This is the output from the terminal:
> lvl-counter#0.1.0 deploy /Users/9to5dev/github/lvl-counter
> gh-pages -d build
sh: gh-pages: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! lvl-counter#0.1.0 deploy: `gh-pages -d build`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the lvl-counter#0.1.0 deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
enter code here
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/9to5dev/.npm/_logs/2019-01-13T12_42_36_512Z-debug.log
Thank you for your help!
Did you try installing gh-pages?
npm install gh-pages

React set up error while running npm start :Configuration file found but no entry configured. Use --help to display the CLI options

I am getting error while setting environment for my react app.
I have not done any thing as per coding prospective .
Its just a hello world programme in react.
I have also uploaded my node modules in the below given url .
I have put down my code in Github : https://github.com/Arpan1089/reactapp
error :
reactapp#1.0.0 start C:\Users\Sumeet\Desktop\reactapp
webpack-dev-server
Configuration file found but no entry configured.
Use --help to display the CLI options.
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v6.11.0
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! reactapp#1.0.0 start: `webpack-dev-server`
npm ERR! Exit status 4294967295
npm ERR!
npm ERR! Failed at the reactapp#1.0.0 start script 'webpack-dev-server'.
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 reactapp package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack-dev-server
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs reactapp
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls reactapp
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Sumeet\Desktop\reactapp\npm-debug.log
Add this in your package.json inside scripts tag
"scripts": {
"start": "webpack-dev-server --hot"
},
and install webpack-dev-server --hot and webpack-dev-server using
npm install webpack-dev-server
And may be you have another process running on the same port (8080) on localhost which will prevent your app to run.

Got error running existing react js app

I am facing this error while running react js app. I already install current version of node js and npm.
~/Desktop/music/client
$ npm start
client#1.0.0 start C:\Users\DIU\Desktop\music\client
./node_modules/webpack-dev-server/bin/webpack-dev-server.js --hot --progress --colors --inline --quiet --history-api-fallback
'.' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
npm ERR! node v7.5.0
npm ERR! npm v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! client#1.0.0 start: ./node_modules/webpack-dev-server/bin/webpack-dev-server.js --hot --progress --colors --inline --quiet --history-api-fallback
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the client#1.0.0 start script './node_modules/webpack-dev-server/bin/webpack-dev-server.js --hot --progress --colors --inline --quiet --history-api-fallback'.
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 client package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ./node_modules/webpack-dev-server/bin/webpack-dev-server.js --hot --progress --colors --inline --quiet --history-api-fallback
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs client
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls client
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\DIU\Desktop\music\client\npm-debug.log
This worked for me:
ctrl + Alt + Delete,
Task Manager,
Find all running instances of node server and kill them.
install your packages.
basic idea is that your node server keeps running in the background even after you think you've closed it in the console and it is accessing all your node files.

Angular 2 seed project failing to webpack when running NPM START

So I downloaded the angular2-seed project from GITHUB and am trying to get it running. I'm using the latest versions of NPM and NODE.
This is the error I'm seeing when running. I've changed the port on webpack and also have changed the port on the server as well as running sudo/non-sudo with the same results.
```
xxx:angular2-seed xxx$ sudo npm start
angular2-seed#1.0.0 start /Users/XX/Desktop/ANGULAR_TESTING/angular2-seed
npm run server
angular2-seed#1.0.0 server /Users/XX/Desktop/ANGULAR_TESTING/angular2-seed
webpack-dev-server --inline --colors --progress --display-error-details --display-cached --port 8080 --content-base src
57% 8/10 build modulesError: listen EADDRNOTAVAIL 122.122.122.122:8080
at Object.exports._errnoException (util.js:1026:11)
at exports._exceptionWithHostPort (util.js:1049:20)
at Server._listen2 (net.js:1244:19)
at listen (net.js:1293:10)
at net.js:1403:9
at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:62:16)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:81:10)
npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/Cellar/node/6.8.0/bin/node" "/usr/local/bin/npm" "run" "server"
npm ERR! node v6.8.0
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! angular2-seed#1.0.0 server: webpack-dev-server --inline --colors --progress --display-error-details --display-cached --port 8080 --content-base src
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular2-seed#1.0.0 server script 'webpack-dev-server --inline --colors --progress --display-error-details --display-cached --port 8080 --content-base src'.
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! webpack-dev-server --inline --colors --progress --display-error-details --display-cached --port 8080 --content-base src
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/XX/Desktop/ANGULAR_TESTING/angular2-seed/npm-debug.log
npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/Cellar/node/6.8.0/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v6.8.0
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! angular2-seed#1.0.0 start: npm run server
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular2-seed#1.0.0 start script 'npm run server'.
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! npm run server
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/XX/Desktop/ANGULAR_TESTING/angular2-seed/npm-debug.log
```
The port 8080 is already in use.
Change the port at:
https://github.com/angular/angular2-seed/blob/master/package.json
on scripts.server

Resources