My env is Ubuntu 14.04 and I'm using node v0.12.2.. I have installed node via nvm tool..
When Bower is installing, the errors is getting..
npm install -g bower
npm ERR! registry error parsing json
npm ERR! registry error parsing json
npm ERR! registry error parsing json
npm ERR! registry error parsing json
npm ERR! registry error parsing json
I have waited long time to finish installing but it is never finished! I have tried do that many times, I was not able to install Bower..
My npm version is 2.7.4. How can I install bower? There is a different way of installing Bower?
Related
I was installing NextJS when I encountered the following error:
D:\Codes\React\Learn>npx create-next-app
npm WARN using --force Recommended protections disabled.
npm WARN using --force Recommended protections disabled.
npm ERR! code E404
npm ERR! 404 File Not Found - GET https://skimdb.npmjs.com/registry/create-next-app
npm ERR! 404
npm ERR! 404 'create-next-app#latest' is not in this registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Local\npm-cache\_logs\2023-02-06T12_41_40_938Z-debug-0.log
Can anyone help me?
I wanted to work with NextJS......but I encountered this error!
You should give directory address in the installation command ,
Try : npx create-next-app#latest . if you want to install the packages in current directory or
npx create-next-app#latest YOUR_FOLDER_NAME and packages will be installed in new folder with the given name as YOUR_FOLDER_NAME.
Try this:
npm i -g create-next-app
It will install create next app globally. To create a next app run this command, if you want to install in current folder.
npx create-next-app
Otherwise, specify the folder name like,
npx create-next-app [your app name]
docker build problem with npm install and it's only inside docker I've tested. it's working on my os perfectly
Error
Step 6/8 : RUN npm cache clear --force && npm install --legacy-peer-deps
---> Running in 361c2a07ac22
npm WARN using --force Recommended protections disabled.
npm notice
npm notice New minor version of npm available! 8.4.1 -> 8.5.0
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.5.0>
npm notice Run `npm install -g npm#8.5.0` to update!
npm notice
npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! errno ERR_SOCKET_TIMEOUT
npm ERR! network Invalid response body while trying to fetch https://registry.npmjs.org/styled-jsx: Socket timeout
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-02-17T07_12_06_500Z-debug-0.log
The command '/bin/sh -c npm cache clear --force && npm install --legacy-peer-deps' returned a non-zero code: 1
docker file
FROM node:alpine
WORKDIR /app
ENV PORT 3000
COPY ./package.json /app/
COPY ./.npmrc ~
RUN npm cache clear --force && npm install --legacy-peer-deps
COPY . /app/
CMD ["npm", "start"]
as u can see I have added .npmrc file because I have read it somewhere but it didn't work or add npm cache clear --force so what should I do?
What version of Node your app is using? And what version of node you have installed on your OS?
You can check it using:
node -v
This image you used node:alpine is the newest version of the node, currently it's 17. So maybe you should use older one (the one you actualy have in your app).
You can find correct image on Docker Hub
I'm pulling an Angular 6 project from our repo to my new laptop. My npm version is 6.9.0. My node version is 12.4.0. The project is an Angular 6.0.7 project. Globally I have Angular 6.0.8 installed, and locally (in my project), I have Angular CLI 6.0.8 but below that where it lists the Angular version, it says Angular: <error>.
ng serve fails with the error Could not find module "#angular-devkit/build-angular" from "my-project-path". Thus I tried to install this via npm install --save-dev #angular-devkit/build-angular. However, this also failed with the error message:
npm ERR! code EINTEGRITY
npm ERR! sha512-spKHSBQIxxS81N/O21WmuXA2F6wppUCsutpzenOeZzOCCJ5gEfcbqJP983IrpLXzYmXnMUa6J03SubcNPdKrlg== integrity checksum failed when using sha512: wanted sha512-spKHSBQIxxS81N/O21WmuXA2F6wppUCsutpzenOeZzOCCJ5gEfcbqJP983IrpLXzYmXnMUa6J03SubcNPdKrlg== but got sha512-2lGfU4gymmhXRUiPLeQlnlkMaSY8azJB9W8e/vFp44AlAOEvzf6XiBUoTHO9NBM4OVlehybxDM9B4SwLBh42mw==. (10271 bytes)
...
npm ERR! code EPROTO
npm ERR! errno EPROTO
npm ERR! request to https://registry.npmjs.org/app-root-path failed, reason: write EPROTO 11628:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:332:
npm ERR!
I checked package-lock.json within my project, and in the file-saver object, the integrity key has sha512-spKHSBQIxxS81N/O21WmuXA2F6wppUCsutpzenOeZzOCCJ5gEfcbqJP983IrpLXzYmXnMUa6J03SubcNPdKrlg== which is referenced in the error message as what npm wanted. I don't know why it got the other integrity value.
Any suggestions on how to resolve this EINTEGRITY error?
Every time I use npm install --save-dev webpack, the command line throws an error saying this:
npm ERR! Unexpected end of JSON input while parsing near '...it","version":"1.4.0"'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\usman\AppData\Roaming\npm-cache\_logs\2020-05-20T02_38_55_455Z-debug.log
I have tried rebooting my PC, install the webpack cli, re-installing Node.js but nothing seems to work. Please help.
I'm getting this error while running npm install on project. The additional information about this issue below,
npm ERR! node-sass#0.9.6 install: `node build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#0.9.6 install script 'node build.js'.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node build.js
npm ERR! You can get their info via:
npm ERR! npm owner ls node-sass
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/capricornus/Projects/aware-app/npm-debug.log
Just install older version of Nodejs with nodebrew.
curl -L git.io/nodebrew | perl - setup
Add the following to ~/.bashrc
export PATH=$HOME/.nodebrew/current/bin:$PATH
Refresh console
source ~/.bashrc
Install older version
nodebrew install-binary v0.12.7
nodebrew use v0.12.7
Then try again!
It looks like this version is no longer compatible. I get the same errors on my system. Either you need to downgrade node to the supported version, or upgrade the dependencies that require node-sass#0.9.6.
Latest version of node-sass is 3.4.2.
In case someone runs into trouble with nodebrew, it's also possible to use nvm (node version manager) to downgrade your node version. Project on Github
On OSX El Capitan, I needed this for the installation:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
. ~/.nvm/nvm.sh
Mind the last line, as it's slightly different from the install instruction on github.
As mentioned by Yosuke Sato, v0.12.7 is compatible with node-sass#0.9.6, so you'd need
nvm install v0.12.7 or nvm use v0.12.7 (if you have it installed already)
This will use the older node version, but only in the current terminal window/tab.
nvm use v0.12.7 in the project directory followed by npm install solved the problem for me -- the error occurred as I was trying to set up broccoli-taco, a static site generator. Thanks for tip, I am glad I googled you up.