node-modules

What are differences between SystemJS and Webpack?

风流意气都作罢 提交于 2019-11-26 11:44:48
问题 I\'m creating my first Angular application and I would figure out what is the role of the module loaders. Why we need them? I tried to search and search on Google and I can\'t understand why we need to install one of them to run our application? Couldn\'t it be enough to just use import to load stuff from node modules? I have followed this tutorial (that uses SystemJS) and it makes me to use systemjs.config.js file: /** * System configuration for Angular samples * Adjust as necessary for your

NPM modules won't install globally without sudo

守給你的承諾、 提交于 2019-11-26 09:36:43
I have just reinstalled Ubuntu 12.04 LTS, and before anything else i did these steps : Installed Node via package manager with the following script sudo apt-get update sudo apt-get install python-software-properties python g++ make sudo add-apt-repository ppa:chris-lea/node.js sudo apt-get update sudo apt-get install nodejs Tried to install yeoman, express, n, yeoman's generators globally and all of them returned the same error npm ERR! Error: EACCES, symlink '../lib/node_modules/n/bin/n' npm ERR! { [Error: EACCES, symlink '../lib/node_modules/n/bin/n'] errno: 3, code: 'EACCES', path: '../lib

Cannot install NodeJs: /usr/bin/env: node: No such file or directory

别来无恙 提交于 2019-11-26 07:50:21
问题 I\'m trying to install nodeJs into my Ubuntu 14.04 in order to use GruntJs. I\'ve read about Ubuntu different way of doing it (issues?), so this is what I\'ve done in order to install it: sudo apt-get install npm sudo npm install -g grunt-cli Typing grunt after that I\'ve got the error: /usr/bin/env: node: No such file or directory So, I\'ve tried: curl -sL https://deb.nodesource.com/setup | sudo bash - sudo apt-get install -y nodejs sudo apt-get update And trying again, and still getting the

Node - was compiled against a different Node.js version using NODE_MODULE_VERSION 51

杀马特。学长 韩版系。学妹 提交于 2019-11-26 07:18:32
问题 I am running a node application on terminal. Have recently upgraded to node v8.5.0, but am getting this error: Error: The module \'/tidee/tidee-au/packages/tidee-au-server/node_modules/bcrypt/lib/binding/bcrypt_lib.node\' was compiled against a different Node.js version using NODE_MODULE_VERSION 51. This version of Node.js requires NODE_MODULE_VERSION 57. Please try re-compiling or re-installing the module (for instance, using `npm rebuild` or `npm install`). at Object.Module._extensions.

How to include scripts located inside the node_modules folder?

我是研究僧i 提交于 2019-11-26 03:36:34
问题 I have a question concerning best practice for including node_modules into a HTML website. Imagine I have Bootstrap inside my node_modules folder. Now for the production version of the website, how would I include the Bootstrap script and CSS files located inside the node_modules folder? Does it make sense to leave Bootstrap inside that folder and do something like the following? <script src=\"./node_modules/bootstrap/dist/bootstrap.min.js\"></script> Or would I have to add rules to my gulp

Could not find a declaration file for module &#39;module-name&#39;. &#39;/path/to/module-name.js&#39; implicitly has an &#39;any&#39; type

这一生的挚爱 提交于 2019-11-26 02:28:56
问题 I read how TypeScript module resolution works. I have the following repository: ts-di. After compiling the directory structure is as follows: ├── dist │ ├── annotations.d.ts │ ├── annotations.js │ ├── index.d.ts │ ├── index.js │ ├── injector.d.ts │ ├── injector.js │ ├── profiler.d.ts │ ├── profiler.js │ ├── providers.d.ts │ ├── providers.js │ ├── util.d.ts │ └── util.js ├── LICENSE ├── package.json ├── README.md ├── src │ ├── annotations.ts │ ├── index.ts │ ├── injector.ts │ ├── profiler.ts │

NPM modules won&#39;t install globally without sudo

我们两清 提交于 2019-11-26 02:04:42
问题 I have just reinstalled Ubuntu 12.04 LTS, and before anything else i did these steps : Installed Node via package manager with the following script sudo apt-get update sudo apt-get install python-software-properties python g++ make sudo add-apt-repository ppa:chris-lea/node.js sudo apt-get update sudo apt-get install nodejs Tried to install yeoman, express, n, yeoman\'s generators globally and all of them returned the same error npm ERR! Error: EACCES, symlink \'../lib/node_modules/n/bin/n\'

How can I update NodeJS and NPM to the next versions?

拟墨画扇 提交于 2019-11-26 01:24:43
问题 I just installed Node.js and npm (for additional modules). How can I update Node.js and the modules which I\'m using to the latest versions? Can npm do it, or do I have to remove and reinstall Node.js and npm to get the next versions? I followed this steps in the npm section. 回答1: See the docs for the update command: npm update [<name> [<name> ...]] This command will update all the packages listed to the latest version (specified by the tag config). It will also install missing packages.

How to use package installed locally in node_modules?

余生长醉 提交于 2019-11-26 00:19:52
问题 How do I use a local version of a module in node.js . For example, in my app, I installed coffee-script: npm install coffee-script This installs it in ./node_modules and the coffee command is in ./node_modules/.bin/coffee . Is there a way to run this command when I\'m in my project\'s main folder? I guess I\'m looking for something similar to bundle exec in bundler. Basically, I\'d like to specify a version of coffee-script that everyone involved with the project should use. I know I can add

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