How to just run post-install?

0 votes

In my node.js project, how could I just run the postinstall script, without running install before ?

This is my package.json :

{
  "name": "gestionclientjs",
  ...,
  "dependencies": {
    ...
  },
  "repository": {},
  "devDependencies": {
    ...
  },
  "engines": {
    "node": ">=0.10.0"
  },
  "scripts": {
    "test": "grunt test",
    "postinstall" : "bower install && node ./app/server/dbSeed.js",
    "start": "node app/server/app.js"
  }
}

For now, I run :

npm install

in my project, but I want to run

npm postinstall

when I want (and when I'm sure dependencies are ok).

Oct 13 in Node-js by kartik
• 35,720 points
33 views

1 answer to this question.

0 votes

Hello @kartik,

You can run individual script entries using npm run SCRIPTNAME:

$ npm run postinstall
Hope it helps!!
Thank You!!
answered Oct 13 by Niroj
• 77,920 points

Related Questions In Node-js

0 votes
1 answer

How to Install a local module using npm?

Hello @kartik, This is what worked for me: npm ...READ MORE

answered Jul 9 in Node-js by Niroj
• 77,920 points
103 views
0 votes
1 answer

How to run Gulp tasks sequentially one after the other?

Hello @kartik, By default, gulp runs tasks simultaneously, ...READ MORE

answered Jul 12 in Node-js by Niroj
• 77,920 points
65 views
0 votes
1 answer

How TO install a local module using npm?

Hello @kartik, In the local module directory: $ cd ...READ MORE

answered Jul 13 in Node-js by Niroj
• 77,920 points
68 views
0 votes
1 answer

How to install a private NPM module without my own registry?

Hello @kartik, In your private npm modules add "private": true to ...READ MORE

answered Jul 13 in Node-js by Niroj
• 77,920 points
108 views
0 votes
1 answer

jQuery AJAX fires error callback on window unload - how do I filter out unload and only catch real errors?

Hello, In the error callback or $.ajax you have three ...READ MORE

answered Apr 27 in Java-Script by Niroj
• 77,920 points
447 views
0 votes
1 answer

How do I pass command line arguments to a Node.js program?

Hello @kartik, If your script is called myScript.js ...READ MORE

answered May 5 in Java-Script by Niroj
• 77,920 points
695 views
0 votes
1 answer

Error:Issue when trying to use IN() in wordpress database

Hello @kartik, Try this code : // Create an ...READ MORE

answered May 8 in PHP by Niroj
• 77,920 points
91 views
+2 votes
1 answer

How do I debug Node.js applications?

Hello @kartik, Use node-inspector  from any browser supporting WebSocket. Breakpoints, ...READ MORE

answered Jul 8 in Node-js by Niroj
• 77,920 points
87 views
0 votes
1 answer

How to install a previous exact version of a NPM package?

Hello @kartik, If you have to install an ...READ MORE

answered Jul 8 in Node-js by Niroj
• 77,920 points
361 views
0 votes
1 answer

How to process POST data in Node.js?

Hello @kartik, You can use the querystring module: var qs = ...READ MORE

answered Jul 9 in Node-js by Niroj
• 77,920 points
444 views