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
I prefer to not rely on shell aliases or another package.
Adding a simple line to scripts
section of your package.json
, you can run local npm commands like
npm run webpack
package.json
{
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"webpack": "webpack"
},
"devDependencies": {
"webpack": "^4.1.1",
"webpack-cli": "^2.0.11"
}
}