This project was created in windows 10 OS , and i changed the OS to Ubuntu ,new projects created from Ubuntu terminal are working.
Error: spawn EACCES
at _errnoException (util.js:1022:11)
at ChildProcess.spawn (internal/child_process.js:323:11)
at Object.exports.spawn (child_process.js:502:9)
at spawn (/usr/local/lib/node_modules/ionic/node_modules/cross-spawn/index.js:17:18)
at spawn (/usr/local/lib/node_modules/ionic/node_modules/#ionic/cli-framework/utils/shell.js:124:12)
at ShellCommand.spawn (/usr/local/lib/node_modules/ionic/node_modules/#ionic/cli-framework/utils/shell.js:113:16)
at Shell.spawn (/usr/local/lib/node_modules/ionic/node_modules/#ionic/cli-utils/lib/shell.js:127:23)
at IonicAngularServeCLI.<anonymous> (/usr/local/lib/node_modules/ionic/node_modules/#ionic/cli-utils/lib/serve.js:392:36)
at Generator.next (<anonymous>)
at fulfilled (/usr/local/lib/node_modules/ionic/node_modules/tslib/tslib.js:104:62)
It's working ! I deleted node_modules folder from project folder and entered in project from terminal
cd name
after that
npm install
Thank you very much for help !
Related
i have alawys use npm start to run a React application
these days i try to use this command i got an error
and it goes like this
ps: i'm using ubuntu 20.04
node:events:371
throw er; // Unhandled 'error' event
^
Error: spawn brave ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
at onErrorNT (node:internal/child_process:480:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (node:internal/child_process:288:12)
at onErrorNT (node:internal/child_process:480:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn brave',
path: 'brave',
spawnargs: [ 'http://localhost:3000' ]
}
I have deleted the cache,
I did delete node_modules and run npm install
and still i face the same problem
and if i use sudo npm start everything works fine
I think you installed node with root permission, that we lead to restricting non-sudo to use global packages.
I suggest that you remove the current node installation, and use nvm instead to install the desired node version https://github.com/nvm-sh/nvm.
after that, you need to install react-create-app again.
I have been trying to get the basic electron-quick-start demo working on Ubuntu 18.04. Everything works up to the point that I try: npm start at which point I get this error:
> electron .
events.js:174
throw er; // Unhandled 'error' event
^
Error: spawn /home/me/docs/electron-quick-start/node_modules/electron/dist/electron EACCES
at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
at Function.Module.runMain (internal/modules/cjs/loader.js:757:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12)
at onErrorNT (internal/child_process.js:415:16)
[... lines matching original stack trace ...]
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron-quick-start#1.0.0 start: `electron .`
npm ERR! Exit status 1
I have tried clearing the npm cache, rebooting, and nothing seems to work.
There seem to be two versions of node.js installed:
node -v ==> v10.15.3
nodejs -v ==> v11.15.0
Both these versions are probably the result of trying to upgrade node.js to a newer version than what comes with Ubuntu, though I don't know why or how. I upgraded following the instructions on this webpage - https://github.com/nodesource/distributions:
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
When that didn't work I tried again with vers 11.x.
My version of npm is: 6.9.0
Why are there two versions of node.js? Could this be the problem?
What should I do to get npm start to work? If clearing everything and starting over is the best approach, I am all for it. This is my first time using node.js, so I am totally lost here. BTW, downloaded electron apps (e.g. VS Code) seem to be working just fine if that's any help.
Solution 1: Try to find the exacly npm/node version your project are using to install.
Better use a npm version manager like nvm.
Solution 2: On linux bash execute:
sudo sysctl fs.inotify.max_user_watches=524288
sudo sysctl -p
The reason?
the OS have a max handle files count. You need to increase this.
Why?
did you realize how many files the node_modules folder has on the smallest/simplest project you have? Now, try to imagine on medium/large project.
I am trying to run a casper scraper on nodejs using SPOOKY. The scraper works fine when I run it on the localhost but gives the error below when I deploy the project on AWS elastic beanstalk server.
Error: spawn casperjs ENOENT
at exports._errnoException (util.js:1018:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:367:16)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
[nodemon] app crashed - waiting for file changes before starting...
I have tried setting binPath: './node_modules/casperjs/bin/casperjs'" and tried installing Casper globally but was unable to do it. I also added command: /^win/.test(process.platform) ? 'casperjs.cmd' : 'casperjs', to the child but that did not work out either.
I have been searching this for more then a week but was unsuccessful.
Please help me in this issue.
You need to install globally casperjs - npm i -g casperjs
You can read more here
I am getting the below error whenever I run nodemon app.js. I have Node.js 7.4.0 and npm 4.1.2 already installed globally and nodemon 6.7.0 as well. If I run my application using command "node" it works fine but if I use command "nodemon" it throws this error.
I tried to uninstall and re-install nodemon but wtih no difference.
The path for npm has been already added to system variables and "C:\Windows\System32" has been added to both user and system variables.
Any kind of help is highly appreciated.
events.js:160
throw er; // Unhandled 'error' event
^
Error: spawn C:\Program Files\nodejs\node.exe ENOENT
at exports._errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:359:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Module.runMain (module.js:607:11)
at run (bootstrap_node.js:420:7)
at startup (bootstrap_node.js:139:9)
at bootstrap_node.js:535:3
I am trying to run react-native on windows and get the following error:
C:\Program Files>react-native init AwesomeProject
This will walk you through creating a new React Native project in
C:\Program Fil es\AwesomeProject Installing react-native package from
npm... events.js:141
throw er; // Unhandled 'error' event
^
Error: spawn npm ENOENT
at exports._errnoException (util.js:860:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at doNTCallback2 (node.js:450:9)
at process._tickCallback (node.js:364:17)
at Function.Module.runMain (module.js:459:11)
at startup (node.js:136:18)
at node.js:972:3
How do I fix this?
This should be fixed in React Native CLI 0.1.9. To update your CLI:
npm uninstall -g react-native-cli
npm install -g react-native-cli
There was a regression in 0.1.8, reported here: https://github.com/facebook/react-native/issues/5169
Check if the gradlew.bat file is present in the android folder if it is not there then simply copy gradlew.bat file from another project.
react-native-cli#0.1.8 error
Rollback react-native-cli#0.1.7
everything is ok.
To fix this, Reinstall NodeJS https://nodejs.org/en/
Then
npm install -g react-native-cli --vebrose
react-native init App --verbose
If it still fails, try installing Python 3 https://www.python.org/ and repeat the process.