npm-install
npm install: Failed at the node-sass@3.13.1 postinstall script
If you run into this issue, read this page: https://www.bramvandenbulcke.be/en/kb/failed-node-sass3131-postinstall-script The solution in my case: 1) Delete the package-lock.json file 2) npm install gulp-sass –save-dev 3) npm install node-sass@latest Version specific notes: node-sass@3.13.1 runs only on versions of Node.js up to v7 as stated in the release notes:
npm ERR! Error: connect ECONNREFUSED when trying to update the npm
Try: npm config set proxy null npm config set https-proxy null npm config set registry http://registry.npmjs.org/ The first two lines will remove proxy’s if there any. Third line will make npm download from the official package registry.
‘cross-env’ is not recognized as an internal or external command,
First, run: rm -rf node_modules rm package-lock.json yarn.lock npm cache clear –force Then run the command npm install cross-env npm install and then you can also run npm run dev
Error : getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
Things to try: make sure you have internet connection: ping 8.8.8.8 make sure you have DNS resolver working: ping www.google.com make sure you can access registry.npmjs.org: ping registry.npmjs.org make sure you can connect via https. Try in your browser: https://registry.npmjs.org/ Make sure you are trying to connect to: registry.npmjs.org and not to: “registry.npmjs.org registry.npmjs.org:443” or … Read more
How to fix NPM package Tar, with high vulnerability about Arbitrary File Overwrite, when package is up to date?
The issue is being tracked on the gitgub page https://github.com/sass/node-sass/issues/2625
What is the NPM equivalent of “yarn install –frozen-lockfile”?
You can use npm ci. npm ci bypasses a package’s package.json to install modules from a package’s lockfile. This ensures reproducible builds—you are getting exactly what you expect on every install. https://blog.npmjs.org/post/171556855892/introducing-npm-ci-for-faster-more-reliable
Making Global NPM packages available to all users on windows 2012 server
Had the same issue. Needed the CI build agent to run a global package on the CLI. Saw this post in a new feature request for system-wide npm -g for Windows. In short: Open an administrator level command prompt Note the current global prefix: npm prefix -g Set the global prefix to the CI user: … Read more
NPM 7 workspaces – how to install new package in workspace?
Workspace support for npm install and npm uninstall was added in npm v7.14.0. You can now just do: npm i somepackage –workspace=submodule0 Uninstalling modules has been the biggest pain, so this is really exciting. The npm team seems to be slowly adding support to commands one by one. Follow updates here: https://github.com/npm/cli/blob/latest/CHANGELOG.md.
Webpack command not found
Your webpack exists in ./node_modules/.bin/ folder . So you should execute this command : ./node_modules/.bin/webpack Check out the answer in this thread . webpack command not working