I have this error when i try to do an npm install --save of a gitlab.com repo :
npm install--save git#gitlab.com:xxxxx\yyyyyy.git
npm ERR! Could not install from "gitlab.com:xxxxx\yyyyyy.git" as it does not contain a package.json file.
I tried to clone and then to link the directory :
git clone
npm link ../directory
Everything works fine.
Is someone have an idea ?
Use it this way: npm install https://github.com/xxxxxx/yyyyyy.git --save
Related
when I try to initialize a react-native project I am getting this error. Anyone know how to resolve this please help
i am using mac
Need to install the following packages:
react-native
Ok to proceed? (y) y
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /Users/codelanticdeveloper/.npm/_npx/7930a8670f922cdb/node_modules/react-native
npm ERR! dest /Users/codelanticdeveloper/.npm/_npx/7930a8670f922cdb/node_modules/.react-native-QIQKGFeg
npm ERR! errno -66
npm ERR! ENOTEMPTY: directory not empty, rename '/Users/codelanticdeveloper/.npm/_npx/7930a8670f922cdb/node_modules/react-native' -> '/Users/codelanticdeveloper/.npm/_npx/7930a8670f922cdb/node_modules/.react-native-QIQKGFeg'
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/codelanticdeveloper/.npm/_logs/2022-02-16T15_54_46_715Z-debug-0.log
where it says...
directory not empty, rename '/Users/codelanticdeveloper/.npm/_npx/7930a8670f922cdb/node_modules/react-native' -> '/Users/codelanticdeveloper/.npm/_npx/7930a8670f922cdb/node_modules/.react-native-QIQKGFeg'
delete the file after the arrow and try again
rm -rf '/Users/codelanticdeveloper/.npm/_npx/7930a8670f922cdb/node_modules/.react-native-QIQKGFeg'
Try deleting all the files in the node modules that end with a similar names, like '*-QIQKGFeg'
I did it manually and it worked for me
I also had this problem and fixed it by:
Deleting the problematic Expo files here per the instructions here I'm trying to reinstall expo-cli package globally with the command sudo npm install --g expo-cli note that I try --force
In the terminal, running nvm install 16.14.0 (this will download the correct Node.js LTS release that is required by Expo)
In the terminal, running brew install watchman (this is required by Expo)
In the terminal, running npm install --global expo-cli (globally downloading Expo again)
In the terminal, running expo init my-app to finally create the new app successfully!
I need to install lodash.filter to my Expo (React Native) project.
How should I do it using npm?
1.
npm i -g npm
npm i --save lodash.filter
npm i --save lodash.filter
I do not understand what npm i -g npm (it's updating something, but I think it will destroy my project).
$ npm i -g npm
$ npm i --save lodash
you can use second command.
npm i is the alias for the npm install and -g means gloabal
The -g or --global argument will cause npm to install the package globally rather than locally
npm install (in package directory, no arguments):
Install the dependencies in the local node_modules folder.
Just follow the command that are written in documentation it will be fine
The --save option instructed NPM to include the package inside of the dependencies section of your package.json automatically, thus saving you an additional step.
Tried installing vue js through
npm install -g #vue/cli.
My npm version is 6.14.4 and node version is 12.16.2
This is the error i am getting
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! Unexpected end of JSON input while parsing near '...nEaUD\r\n=F4TR\r\n---'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Sudesh\AppData\Roaming\npm-cache\_logs\2020-04-16T01_32_53_989Z-debug.log
I tried looking into the repo. I didn't understand what is the solution for this problem.
Try npm cache clean --force and then run the npm install -g #vue/cli . I think this must solve your issue.
Try npm cache clean --force and then run the npm install -g #vue/cli I think this must solve your issue.
Basically, use the npm cache clean --force command in our terminal to delete all data from your cache folder after that run npm install -g #vue/cli. then run vue create myapp to create your vue CLI app
Step : 1 npm cache clean --force
Step : 2 npm install -g #vue/cli
clean npm cache: npm cache clean --force
if you are using mac or Linux try with sudo npm install -g #vue/cli
for windows npm install -g #vue/cli
When I download a project from my repo with a package.json in its root, which command is the right one to use npm install or npm install restore?
The behaviour of npm install is
npm install without any argument will install all packages found in package.json in node_modules folder.
npm install <package_name> will install package_name. In your case will download restore package and will save it in node_modules folder. (https://www.npmjs.com/package/restore)
Just type:
npm i
From help:
>npm i -h
npm install (with no args, in package dir)
npm install [<#scope>/]<pkg>
npm install [<#scope>/]<pkg>#<tag>
npm install [<#scope>/]<pkg>#<version>
npm install [<#scope>/]<pkg>#<version range>
npm install <folder>
npm install <tarball file>
npm install <tarball url>
npm install <git:// url>
npm install <github username>/<github project>
aliases: i, isntall, add
common options: [--save-prod|--save-dev|--save-optional] [--save-exact] [--no-save]
npm install ethereum/web3.js --save
I get:
npm ERR! code ENOGIT
npm ERR! No git binary found in $PATH
npm ERR!
npm ERR! Failed using git.
npm ERR! Please check if you have git installed and in your PATH.
I was also facing same issue but it's simple to solve it. Follow the below step it works for me.
1) Download git from here and install on your PC.
2) Then just restart your CMD.
3) Then Execute npm install ethereum/web3.js --save Command.
And you are good to go. Hope it will be helpful for others also.
Run cmd with Administrator privilege
Run => npm install --global --production windows-build-tools
Run => npm install --save web3#1.0.0-beta.26 (in your project directory)
this worked for me! simply type web3.js