How to install gulp globally - npm

I am trying to istall gulp globally at work computer and find some error
> PS C:\OpenServer\domains\the_witcher_3_wild_hunt> npm install gulp -g
> npm ERR! path \\DOM-PDC\HomeWin7$\ npm ERR! code ELOOP npm ERR! errno
> -62 npm ERR! syscall stat npm ERR! ELOOP: too many symbolic links encountered, stat '\\DOM-PDC\HomeWin7$\'
>
> npm ERR! A complete log of this run can be found in: npm ERR!
> C:\Devel\nodejs\npm-cache\_logs\2019-07-31T08_56_13_632Z-debug.log
Edit:
I have read this related issue and can confirm that no previous version of gulp is installed.
I have also cleared the npm cache by running; npm cache clean --force, however the same problem still persists.

This problem is about "prefix", as it suggest #TripeHound.
If you have similar problem you can find answers here

Related

Got errs with puppeteer and node-sass running npm i

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

error while running "npm run build" in vue application

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

can't install any atom packages with npm error

unable to install any packages on atom. The error is
npm ERR! code Z_BUF_ERROR
npm ERR! errno -5
npm ERR! zlib: unexpected end of file
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/yaoli/.atom/.apm/_logs/2020-02-17T09_39_31_164Z-debug.log
I have tried to clean the npm cached and reinstall npm. It didn't work.
I resolved this by deleting the contents of ~/.atom/.apm and then reinstalling the package through the atom gui.
~/.atom/.apm$ rm -rf *

Local package.json exists, but node_modules missing, did you mean to install?

I am trying to clone and use pix/pix in my laptop for a university project
(https://github.com/1024pix/pix). But I am getting the following error:
H:\Bachelor YGREC - Modelling & Data Science\Bachelor Year 1\Project\Project 2\pix>npm run configure
> pix#2.116.0 configure H:\Bachelor YGREC - Modelling & Data Science\Bachelor Year 1\Project\Project 2\pix
> npm install && run-s ci:all test configure:api
> pix#2.116.0 preinstall H:\Bachelor YGREC - Modelling & Data Science\Bachelor Year 1\Project\Project 2\pix
> test "$(npm --version)" = 6.13.4
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pix#2.116.0 preinstall: `test "$(npm --version)" = 6.13.4`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pix#2.116.0 preinstall 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\Administrator\AppData\Roaming\npm-cache\_logs\2020-02-24T10_36_42_126Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pix#2.116.0 configure: `npm install && run-s ci:all test configure:api`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pix#2.116.0 configure 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\Administrator\AppData\Roaming\npm-cache\_logs\2020-02-24T10_36_42_183Z-debug.log
You should have found the answer by now but if someone else find it useful, just run npm install in your console.
Write npm start in the terminal followed by npm install. This will solve your issue.

yodoctor: command not found when installing yo from terminal

Below is the error I keep getting. It seems to indicate a "post-install" issue with yodoctor. Sadly yodoctor is the advice given by the yeoman team to help with this issue. I have other node_modules installed (bower, grunt, typescript).
sh: yodoctor: command not found
npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/Cellar/node/5.0.0/bin/node" "/usr/local/bin/npm" "install" "-g" "yo"
npm ERR! node v5.0.0
npm ERR! npm v3.3.9
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! yo#1.5.0 postinstall: `yodoctor`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the yo#1.5.0 postinstall script 'yodoctor'.
npm ERR! This is most likely a problem with the yo package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! yodoctor
npm ERR! You can get their info via:
npm ERR! npm owner ls yo
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/jesselawson/.node_modules_global/lib/node_modules/npm-debug.log
This error is generally caused because someone used sudo at some point and messed up their npm package directory permissions. As a rule of thumb, never ever use sudo.
So how can you fix it? Here's a couple troubleshooting points:
Make sure you update npm to the latest version (npm install -g npm). npm 2.x had some race conditions that would try to run yodoctor before it is installed.
Make sure the global npm module folders is chown/chmod to your user.
Make sure npm module binaries is in your PATH.
If nothing works, then you can force install it by running npm i -g yeoman-doctor && npm i -g yo - but that really is a last recourse solution.
Just the following command would do the trick:
sudo npm install -g yo
if not, find where yo is, add it to the path as follows:
export PATH="$PATH:<path where yo is installed>"