Johannes
Johannes

Reputation: 1

Missing node_modules when deploying AngularJS2 application to Bluemix

We're trying to deploy an AngularJS2 application to bluemix but we're missing the folder "node_modules" after the application was deployed to the server. We're using npm to build the application.

I found the following post that is mentioning the problem: (https://developer.ibm.com/answers/questions/181207/npm-install-within-subdirectory-not-creating-node.html)

My question would now be: what's the recommended best practice?

Upvotes: 0

Views: 125

Answers (1)

kulkarniankita
kulkarniankita

Reputation: 326

I believe you are installing the node modules using npm install, you also should save those module in your package.json file which you can do that by npm install --save.

The recommended best practice would be to Setup a Build Pipeline.

There could be 3 stages or more:

  • Build Stage: It builds the app so doing things like npm install there so your folder node_modules gets created for you.
  • Test Stage: Tests the app so doing things like npm test would run all the tests in your app
  • Deploy Stage: Once build and deploy stage runs successfully, Deploy will actually deploy the app to the Bluemix domain.

Upvotes: 2

Related Questions