I am currently using node to build a website. I have run the webpack dev server fine in ubuntu but in windows i cant seem to get the npm start command to work
I am able to npm run build-sw on both platforms without error but just not able to run.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! site#1.0.0 start: `npm run build-sw && ./node_modules/.bin/webpack-dev-server --progress --host 0.0.0.0 --no-info --watch-poll`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the site#1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
This
I finally was able to get the project running using YARN.
It needed no configuration change.
I had to install Visual C++ but after that
yarn and yarn run start did the trick.
So on ubuntu I use npm but on windows i use yarn. Works now
Related
I have a double problem.
The work environment is in Vue and Nuxt, with a mac M1 pro.
Until last week, I had no problems, everything was running perfect. They changed my mac and the world stopped running.
I download 2 repos, but when running npm i, one explodes with puppeteer and the other with node-sass.
npm ERR! code ELIFECYCLE npm ERR! error 1 npm ERR! puppeteer#8.0.0 install:nodeinstall.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the puppeteer#8.0.0 install script.
npm ERR! code ELIFECYCLE npm ERR! error 1 npm ERR! node-sass#4.14.1 postinstall: node scripts/build.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass#4.14.1 postinstall script.
I am using the correct version of Node.
I tried deleting the package-lock.json and the node_modules, clearing the npm cache, and running npm i again, and no, it breaks.
I tried installing those specific packages outside of npm i, and I get the same error.
I tried creating a .npmrc file with
registry=https://registry.npmjs.org always-auth=true //registry.npmjs.org/: "token"
I am using the same package.json and the same repos as my peers. They also have mac M1 and have no problem.
On Github we have the same permissions.
Any idea what is happening?
Thank you very much in advance \o/
You can use sass instead of node-sass. This is because node-sass has been deprecated.
npm uninstall node-sass
npm install sass
Works all the same, no need to make any other changes
I currently have an issue where I can no longer work, with a machine that I bought using NPM. The issue does not run using npm start.
david#Davids-MacBook-Pro happy % npm start
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! happy#0.1.0 start: react-scripts start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the happy#0.1.0 start 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/david/.npm/_logs/2020-08-09T06_56_49_544Z-debug.log
This is the main issue. Also have "2020-08-09T06_56_49_544Z-debug.log"
Can anyone help me...
Thanks you,
David
The NPM One
2020-08-09T06_56_49_544Z-debug.log
You are trying to run this from your /Users/david/ directory. You need to navigate to the root of your project (where package.json is), then do npm start:
$ cd path/to/my/project
$ npm start
Update:
Add that babel-eslint package to your package.json.
Show your directory tree inside users/David/happy
Thanks very much. I have finally been able to make NPM work using because there are two different type of sites ~/david and ~/david/happy.
I completely removed the NPM of ~/david, and now only have NPM for ~/david/happy working now.
the issue is
https://github.com/facebook/create-react-app/issues/8781
I have cloned vue application from git hub(https://github.com/jimmerioles/progressive-weather-app), for automating the deployment in jenkins. Before doing it, i am checking in my ubuntu machine(GCP vm). There i have installed java,nodejs, npm and vuecli. When i execute a command "npm run build" getting the below error. I tried re-installing vuecli, nodejs and npm also., still getting the same error. Kindly let me know how can i fix this.
npm version is "6.2.0", nodejs version is "v14.3.0" and vuecli is a latest one.
root#instance-2:~/weather/src# npm run build
> PWeatherApp#0.1.0 build /root/weather
> vue-cli-service build
sh: 1: vue-cli-service: not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! PWeatherApp#0.1.0 build: `vue-cli-service build`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the PWeatherApp#0.1.0 build 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! /root/.npm/_logs/2020-05-23T18_32_20_092Z-debug.log
its may help you:
npm install -g #vue/cli
# OR
yarn global add #vue/cli
QUESTION: How can I make it so $ echo $PATH returns export PATH=~/.npm-global/bin:$PATH
BACKSTORY:
I did an npm install on terminal (macOS Catalina) and started
to get into a loop about installing expo cli when trying to npm
start. I've since followed instructions here:
https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally
had to execute step 5 (from link above) as source ~/.bash_profile
Tried npm start but still running into the loop
Already have npm 6.13.4 installed. However, running npm start results in below. Notice how it says Expo CLI installed but asked to install globally again so the 2nd time I say n:
(base) MacBook-Pro:rn-starter user$ npm start
> # start /Users/user/Desktop/REACT NATIVE/rn-starter
> expo start
This command requires Expo CLI.
Do you want to install it globally [Y/n]? Y
Installing the package 'expo-cli'...
Expo CLI installed. You can run `expo --help` for instructions.
This command requires Expo CLI.
Do you want to install it globally [Y/n]? n
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # start: `expo start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # start 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/user/.npm/_logs/2020-04-03T14_39_24_884Z-debug.log
Here's what's on line 8 of the log file:
8 verbose lifecycle #~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/user/Desktop/REACT NATIVE/rn-starter/node_modules/.bin:/opt/anaconda3/bin:/opt/anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/usr/local/git/bin
I've previously installed Anaconda (several months back) and have uninstalled it using https://docs.anaconda.com/anaconda/install/uninstall/ However, running $ echo $PATH results in
/opt/anaconda3/bin:/opt/anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/usr/local/git/bin
QUESTION: How can I make it so $ echo $PATH returns export PATH=~/.npm-global/bin:$PATH
Appreciate any suggestions that can help!
How is your package.json file?
Your npm start must is calling the expo
I am getting this error when am trying to do npm install...am struck with this nearly for 4 days...please can someone help me out...
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "c:\\Program Files\\nodejs\\node.exe" "c:\\Users\\Username\\AppData\\Roaming\\npm\\node_modules\\n pm\\bin\\npm-cli.js" "install"
npm ERR! node v0.10.33
npm ERR! npm v2.1.5
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! phantomjs#1.9.12 install: `node install.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the phantomjs#1.9.12 install script.
npm ERR! This is most likely a problem with the phantomjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls phantomjs
npm ERR! There is likely additional logging output above.
I had the exact same issue on Windows. To fix it, I took the following steps:
Install the latest version of phantomjs (currently, phantomjs-1.9.8-windows) locally, by downloading and unziping. I had a previous version which was not compatible with phantomjs npm package.
Update your environment variable to point to latest version of phantomjs.exe (PHANTOMJS_HOME).
Exit and restart windows prompt or shell to recognize variable.
Now, npm install or specifically, npm install phantomjs#1.9.12 should work correctly.
You can test your local phantomjs executable install with a where phantomjs and phantomjs -v from a git bash shell or command prompt.
I am working under a corporate proxy, So it was blocking npm to download 'phantom' from https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-windows.zip
So, I fixed it in the following way...
Download 'phantomjs-2.1.1-windows.zip' file from the above link directly.
Copy and paste it to 'C:\Users\user_name\AppData\Local\Temp\phantomjs\phantomjs-2.1.1-windows.zip'
Now, just do 'npm install', it will work like a charm.
Read the error and find the correct version of phantomjs (might be 1.9.12 or 2.1.1 ).
Find the appropriate file in the maven repo.
Download the zip file and copy the same zip file to C:\Users\User_ID\AppData\Local\Temp\phantomjs\ and paste it (in zip format).
Set or create an environment variable PHANTOMJS_HOME
to C:\Users\User_ID\AppData\Local\Temp\phantomjs\phantomjs-1.9.8-windows.zip.
restart the command prompt and run npm i or npm install