npm-install

npm - EPERM: operation not permitted on Windows

邮差的信 提交于 2019-11-26 04:40:34
问题 I ran npm config set prefix /usr/local After running that command, When trying to run any npm commands on Windows OS I keep getting the below. Error: EPERM: operation not permitted, mkdir \'C:\\Program Files (x86)\\Git\\local\' at Error (native) Have deleted all files from C:\\Users\\<your username>\\.config\\configstore\\ It did not work. Any suggestion ? 回答1: Running this command was my mistake. npm config set prefix /usr/local Path /usr/local is not for windows. This command changed the

Installing a local module using npm?

杀马特。学长 韩版系。学妹 提交于 2019-11-26 04:03:25
问题 I have a downloaded module repo, I want to install it locally, not globally in another directory? What is an easy way to do this? 回答1: From the npm-link documentation: In the local module directory: $ cd ./package-dir $ npm link In the directory of the project to use the module: $ cd ./project-dir $ npm link package-name Or in one go using relative paths: $ cd ./project-dir $ npm link ../package-dir This is equivalent to using two commands above under the hood. 回答2: you just provide one

NPM Install Error:Unexpected end of JSON input while parsing near &#39;…nt-webpack-plugin“:”0&#39;

瘦欲@ 提交于 2019-11-26 02:19:00
问题 When Creating a new Angular 5 project: node version: 8.9.2 npm version: 5.5.1 My Command is npm install -g @angular/cli the Error is npm ERR! Unexpected end of JSON input while parsing near \'...nt-webpack-plugin\":\"0\' npm ERR! A complete log of this run can be found in: C:\\Users\\Aashitec\\AppData\\Roaming\\npm-cache_logs\\2017-12-06T13_10_10_729Z-debug.log the error log is http://www.aashitechno.in/2017-12-06T13_10_10_729Z-debug.log 回答1: This solved it for me: npm cache clean --force npm

xcode-select active developer directory error

こ雲淡風輕ζ 提交于 2019-11-26 00:56:18
问题 Saw the following error when running an npm install which required node-gyp ... but could be triggered by anything which requires xcode-select . xcode-select: error: tool \'xcodebuild\' requires Xcode, but active developer directory \'/Library/Developer/CommandLineTools\' is a command line tools instance What is the problem? 回答1: This problem happens when xcode-select developer directory was pointing to /Library/Developer/CommandLineTools , when a full regular Xcode was required (happens when

How to install an npm package from GitHub directly?

折月煮酒 提交于 2019-11-25 23:35:58
问题 Trying to install modules from github results in: ENOENT error on package.json. Easily reproduced using express: npm install https://github.com/visionmedia/express throws error. npm install express works. Why can\'t I install from github? Here is the console output: npm http GET https://github.com/visionmedia/express.git npm http 200 https://github.com/visionmedia/express.git npm ERR! not a package /home/guym/tmp/npm-32312/1373176518024-0.6586997057311237/tmp.tgz npm ERR! Error: ENOENT, open

xcode-select active developer directory error

江枫思渺然 提交于 2019-11-25 20:03:35
Saw the following error when running an npm install which required node-gyp ... but could be triggered by anything which requires xcode-select . xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance What is the problem? tjmehta This problem happens when xcode-select developer directory was pointing to /Library/Developer/CommandLineTools , when a full regular Xcode was required (happens when CommandLineTools are installed after Xcode) Solution: Install Xcode (get it from https://developer