Skip to content
This repository has been archived by the owner on Dec 16, 2020. It is now read-only.

Deploy to cloud bug fix #56

Merged
merged 7 commits into from Sep 13, 2018
Merged

Deploy to cloud bug fix #56

merged 7 commits into from Sep 13, 2018

Conversation

sanjeevghimire
Copy link
Contributor

@sanjeevghimire sanjeevghimire commented Sep 13, 2018

This PR closes: #55 . The issue is to do with dev dependencies not installed when pushing to cloudfoundry using ibmcloud cli.

The project use Typescript. Node.js doesn't understand typescript directly, so it has to be compiled into JavaScript first using tsc command and then run the built project. Since typescript is added as a devDependency in package.json, relying on Cloud Foundry to install the dependency didn't work.

The solution was to build the project before you push to IBM cloud. The steps are:

  • Run npm run build locally which creates a dist directory with compiles source files.
  • copy package.json to the dist folder
  • Push to IBM cloud and run server.js.

@stevemar
Copy link
Contributor

@sanjeevghimire can you update the commit message to describe how you fixed the bug? And also include the text Closes: #55 so it's linked to the bug.

Sanjeev Ghimire added 2 commits September 12, 2018 21:23
* Since tsc is used as dev dependency, do the build locally as npm install wouldn't install dev dependency in IBM cloud
* copy the package.json to the dist directory
* ibm cloud cf push crm-server
@sanjeevghimire
Copy link
Contributor Author

@stevemart commit message amended.

Copy link
Member

@scottdangelo scottdangelo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. But I don't see the commit message.

@scottdangelo
Copy link
Member

OK, I think the message is in one of the commits.

@scottdangelo scottdangelo merged commit 84d80c4 into master Sep 13, 2018
@scottdangelo scottdangelo deleted the deploy-to-cloud-bug-fix branch September 13, 2018 11:53
@sanjeevghimire
Copy link
Contributor Author

This PR fixes/closes #55 . The issue is to do with dev dependencies not installed when pushing to cloudfoundry using ibmcloud cli.

The project use Typescript. Node.js doesn't understand typescript directly, so it has to be compiled into JavaScript first using tsc command and then run the built project. Since typescript is added as a devDependency in package.json, relying on Cloud Foundry to install the dependency didn't work.

The solution was to build the project before you push to IBM cloud. The steps are:

  • Run npm run build locally which creates a dist directory with compiles source files.
  • copy package.json to the dist folder
  • Push to IBM cloud and run server.js.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Running on IBM Cloud fails
3 participants