npm-install

Node can't find certain modules after synchronous install

与世无争的帅哥 提交于 2019-12-01 10:59:55
问题 I've got a script that synchronously installs non-built-in modules at startup that looks like this const cp = require('child_process') function requireOrInstall (module) { try { require.resolve(module) } catch (e) { console.log(`Could not resolve "${module}"\nInstalling`) cp.execSync(`npm install ${module}`) console.log(`"${module}" has been installed`) } console.log(`Requiring "${module}"`) try { return require(module) } catch (e) { console.log(require.cache) console.log(e) } } const http =

AWS EC2 Angular 5 ng serve not connecting via browser

会有一股神秘感。 提交于 2019-12-01 07:28:27
问题 I managed to get my Angular 5 app running on AWS EC2 Ubuntu... Started standard Ubuntu instance, used PuTTy to shell in, installed node, entered the next 4 "magic lines"... mkdir ~/.npm-global npm config set prefix '~/.npm-global' export PATH=~/.npm-global/bin:$PATH source ~/.profile made my company dir, did a global npm install for @angular/cli, cloned my git, changed dir to project subfolder, did a local npm install for @angular/cli, and then ran npm install for my project. At this point, I

npm Unable to Install angular-cli

拟墨画扇 提交于 2019-12-01 07:22:43
问题 I am trying to install angular-cli via npm. I have the recent version of Nodejs and git installed. I am not behind any proxy server(verified it through netsh winhttp show proxy as well as through Internet Explorer LAN settings) and there is no problem with my internet connection. When i try to run npm install -g angular-cli then I get the following error C:\Windows\system32>npm install -g angular-cli npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program

NPM not working (Cannot find module 'internal/fs' - nodejs)

痴心易碎 提交于 2019-12-01 05:12:16
NPM error on update. I recently update to Node version 7.x. Now npm is not working. I am unable to locate the error, it may be due to - npm ERR! Cannot find module 'internal/fs' . I get the following when I run sudo npm update -g - npm ERR! Linux 3.13.0-101-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "update" "-g" npm ERR! node v7.1.0 npm ERR! npm v3.10.8 npm ERR! code MODULE_NOT_FOUND npm ERR! Cannot find module 'internal/fs' npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! <https://github.com/npm/npm/issues> My /etc/profile.d/nodejs.sh has the following

How to have npm install a typescript dependency from a GitHub url?

試著忘記壹切 提交于 2019-12-01 03:17:40
Consider the following scenario: There is a code library. The library is written in TypeScript and the typescript code is published in GitHub. The package.json file has a build script which creates JavaScript files based on the TypeScript code and a publish script which then places the resulting JS files on npm. I make a fork of the GitHub repo, make some modifications to the typescript files and push those changes to GitHub. (I also open a PR to the original GitHub repo but there is a time lage before these changes can be merged.) I wish to consume these code changes in a downstream NPM

After `npm install` an error about a syntax error in python appears?

末鹿安然 提交于 2019-12-01 03:05:59
I am trying to install the necessary dependencies for Exokit, but I am getting an error relating to a Python syntax error. This is for a something new I wanted to try involving VR in the browser. I've recloned the repository from their github and downloaded straight from their website. I followed the instructions given to a T (there was only 4 of them lol). I have not yet touched the code and this is the error that I am getting. Austin@DESKTOP-UD2R1O4 MINGW64 ~/exokit (master) $ npm install > raw-buffer@0.0.19 install C:\Users\Austin\exokit\node_modules\raw-buffer > node-gyp rebuild C:\Users

NPM not working (Cannot find module 'internal/fs' - nodejs)

一曲冷凌霜 提交于 2019-12-01 02:07:12
问题 NPM error on update. I recently update to Node version 7.x. Now npm is not working. I am unable to locate the error, it may be due to - npm ERR! Cannot find module 'internal/fs' . I get the following when I run sudo npm update -g - npm ERR! Linux 3.13.0-101-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "update" "-g" npm ERR! node v7.1.0 npm ERR! npm v3.10.8 npm ERR! code MODULE_NOT_FOUND npm ERR! Cannot find module 'internal/fs' npm ERR! npm ERR! If you need help, you may report this

npm install permission denied (macOS)

谁都会走 提交于 2019-11-30 21:20:20
To install a Bootstrap theme I want to run npm install. However I always receive a permission denied error. I already tried nvm and then switched with nvm use 10.9.0 to run npm install . I also tried sudo chown -R $(whoami) ~/.npm and sudo chown -R $USER /usr/local/lib/node_modules . Neither solved it and now I am bit out of ideas how I can continue. I use macOS High Sierra. Marcs-MBP-3:masterclass Marc$ npm install npm WARN deprecated gulp-uglifyjs@0.6.2: Since gulp-sourcemaps now works, use gulp-uglify instead npm WARN deprecated babel-preset-es2015@6.24.1: 🙌 Thanks for using Babel: we

NPM Package not found but found on website

微笑、不失礼 提交于 2019-11-30 21:02:19
问题 so I am trying to install https://www.npmjs.com/package/@progress/kendo-react-grid the package exists on the website but when I run the command npm i @progress/kendo-react-grid I get a 404 error Ideas ? So far I think the user scope is what is messing it up 0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', 1 verbose cli '/usr/bin/npm', 1 verbose cli 'i', 1 verbose cli '@progress/kendo-react-grid' ] 2 info using npm@5.7.1 3 info using node@v8.9.4 4 verbose npm-session

Is `npm install` same as `meteor npm install` in Meteor 1.3?

淺唱寂寞╮ 提交于 2019-11-30 18:49:51
问题 Going through some meteor libraries, I notice that npm install and meteor npm install are both used in instructions. I know Meteor 1.3 introduced support for npm modules, so what is the difference between these two commands? 回答1: meteor npm install will place the node_modules folder at the root of your project and modify the package.json at the root of your meteor project. While npm install will work relative to your current directory. Source: Experience. I'm not 100% certain, but I have used