I am installing famo.us, and I created a project, then went into the folder and ran famous dev like it says here, but then I get an error:
http://famous.org/get-started.html
C:\Users\Me\Desktop\Apps\Messenger>famous create messenger
Seed project created at: C:\Users\Me\Desktop\Apps\Messenger\messenger
C:\Users\Me\Desktop\Apps\Messenger>cd messenger
C:\Users\Me\Desktop\Apps\Messenger\messenger>famous dev
Node Modules not yet installed, attempting to do so now.
events.js:85
throw er; // Unhandled 'error' event
^
Error: spawn npm ENOENT
at exports._errnoException (util.js:746:11)
at Process.ChildProcess._handle.onexit (child_process.js:1053:32)
at child_process.js:1144:20
at process._tickCallback (node.js:355:11)
C:\Users\Me\Desktop\Apps\Messenger\messenger>
It's a known issue in windows.
First run npm install from the command prompt.
Then, in package.json change the "dev" line under "scripts" to:
"dev": "npm run watch | serve public/ -p 1618",
and then run npm run dev from the command line (instead of famous dev)
The error when running famous dev has been resolved as of Famous-cli version 0.2.8
Run this command at the command line with npm enabled
npm update -g famous-cli
Note: There is an issue with parallel commands in windows using npm so you will not get a watched server when running famous dev from the default famous create seed as of version 0.2.8
Related
I am trying to run a npx command on my M1 MacBook but I keep getting the same error. I already installed node.js and npm so that I could run this command:
npx #mondaydotcomorg/monday-cli scaffold run ./ quickstart-react
However, when I run this command the output is:
> Repository was downloaded successfully
> Copying the directory
> Installing packages. It can take a few moments
> Node modules were installed successfully
> Running the project
Error: Command failed: npm run start
at ChildProcess.exithandler (node:child_process:389:12)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1091:16)
at Socket.<anonymous> (node:internal/child_process:449:11)
at Socket.emit (node:events:513:28)
at Pipe.<anonymous> (node:net:757:14) {
code: 1,
killed: false,
signal: null,
cmd: 'npm run start'
}
Before, I was getting an issue saying sh: concurrently: command not found and kill-port: command not found so I installed concurrently and kill-port using npm, which removed this error messages. However, now I get the output above. I installed node.js again and updated npm version to latest version, but no change. Any suggestions on how to fix this?
Edit: I found this link that is a solution to my exact problem. (https://community.monday.com/t/monday-cli-seems-not-to-work-on-apple-m1/36745). I ran npm install kill-port and ran npm upgrade and both executed correctly. However, when I try to run npm run start command by itself, this is my output:
npm ERR! Missing script: "start"
npm ERR!
npm ERR! Did you mean one of these?
npm ERR! npm star # Mark your favorite packages
npm ERR! npm stars # View packages marked as favorites
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR! npm run
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/mattspc/.npm/_logs/2022-07-18T21_08_52_459Z-debug-0.log
I think I need to find my destination folder and cd to it, then run npm run start within that folder. Any advice on how to locate it?
Finally figured out an answer to my own question. The main issue was my npm version and node.js version.
To get the latest stable version of npm, run this command in terminal npm install -g npm#latest and make sure you download the correct node.js version (this one is for Apple Silicon Chip/M1, select the option on the left). Then, run nvm use --lts command in terminal to make sure you are using the correct and most stable node.js version. Finally, look in the main directory (firstnamelastname folder on Mac) and delete the quickstart-react folder if it already exists. Then, run npx #mondaydotcomorg/monday-cli scaffold run ./ quickstart-react in terminal (if there is an error message, quit terminal and reopen it, then continue with the next step). You need to run the next part locally, so do cd quickstart-react, then npm run start and it should work. If there is any error message and it says something like sh: kill-port: command not found you need to install that specific dependency within the quickstart-react folder, so search up "npm install kill-port" or "npm install ____" depending on the error, quit and reopen terminal, do cd quickstart-react and run those install commands inside the quickstart-react folder. Should work after that.
If this doesn't work try using this link (https://community.monday.com/t/problem-to-setup-development-environment-quick-start-guide-with-cli/9422) that shows how to manually do this (this didn't work for me however).
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'm working on a pretty simple nuxt.js project, I've started to notice that every time I reboot my machine (my laptop, running Ubuntu 18.04.1 LTS) and reopen my project, when I try to rerun the dev server npm run dev... it won't work, i get this error:
events.js:183
throw er; // Unhandled 'error' event
^
Error: watch /path/to/project/layouts ENOSPC
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! project_name#1.0.0 dev: `nuxt`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the project_name#1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I've tried all sorts of things to solve this problem, and have recently realized that if I take the following steps it starts to work again:
cd into a new directory
create a new project npx create-nuxt-app project
then cd into that project and run that dev server npm run dev, then quit that dev server
then cd back into my original project (which was throwing the error) and run the dev server... and then somehow that would work
Obviously, this is bizarre and not a sustainable solution. Any ideas what might be going on here?
This question already has answers here:
Node.js: what is ENOSPC error and how to solve?
(17 answers)
Closed 3 years ago.
I am currently working on a react project and have already developed the basic components. Everything was working fine yesterday. Then I started a new react native project. After installing the project using create-react-native-app, the npm start command failed to start the server but it was working just fine for the react project.
I was using node 10.6 and npm 5.6. After reading some suggestions, I changed node to v8.11 and npm to 6.2. After installing watchman and changing the inotify watches, I finally fot the native app to start.
Today, I tried to start the react project and the server is not starting.
This is what the terminal is displaying...
Starting the development server...
events.js:183
throw er; // Unhandled 'error' event
^
Error: watch /home/maneesh/source_code/react/ytc/public ENOSPC
at _errnoException (util.js:992:11)
at FSWatcher.start (fs.js:1382:19)
at Object.fs.watch (fs.js:1408:11)
at createFsWatchInstance (/home/maneesh/source_code/react/ytc/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:37:15)
at setFsWatchListener (/home/maneesh/source_code/react/ytc/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:80:15)
at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/maneesh/source_code/react/ytc/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:228:14)
at FSWatcher.NodeFsHandler._handleDir (/home/maneesh/source_code/react/ytc/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:407:19)
at FSWatcher.<anonymous> (/home/maneesh/source_code/react/ytc/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:455:19)
at FSWatcher.<anonymous> (/home/maneesh/source_code/react/ytc/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:460:16)
at FSReqWrap.oncomplete (fs.js:153:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ytc#0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ytc#0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I am using ubuntu 18.04
node 8.11
npm 6.2
Any idea what the problem could be?
You can run the below command to avoid ENOSPC:
echo fs.inotify.max_user_watches=524288 | sudo tee -a
/etc/sysctl.conf && sudo sysctl -p
For Arch Linux add this line to /etc/sysctl.d/99-sysctl.conf:
fs.inotify.max_user_watches=524288
Finally, run:
sysctl --system
This will also persist across reboots.
Source: https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers#the-technical-details
try this
create-react-app my-app
cd my-app
npm install react-scripts#2.1.8
npm start
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.