-
Hi! I’m adding the node.js Github Action and I’m having a very basic issue. This project has existed for a while, and the standard npm install/npm build (or even npm run) work as expected in a development environment. In the Github Action,
The specific line in src/services/stitch.service.js is: The src/config.js file exists. As this is an established project I’d rather not muck around with changing the import to be absolute instead of relative (e.g. something like ./src/config). I’d hate for others to have their builds start failing because I changed that. I have read this page but it doesn’t address my issue: Building and testing Node.js - GitHub DocsWhat am I missing? If you need insight into the repository, it’s at WildAid/o-fish-webWeb application for the Officer's Fishery Information Sharing Hub (O-FISH). The web app allows agencies to gain insights from the aggregated information gathered during a routine vessel inspect... and the workflow is at: .github/workflows/node.js.yml (sorry, I can only post 2 links max because I’m new to the forums.) Thanks in advance for assistance! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
The relative path in the script files should relative to the working directory of current step in the job of the workflow. To explain this, here is an example:
The results: |
Beta Was this translation helpful? Give feedback.
-
This is a problem because when the repo is checked out, config.js doesn’t exist - config.js.tmpl does. So I had to add to the yaml file to copy the file and update it with the proper values. |
Beta Was this translation helpful? Give feedback.
-
No, you do not need to do this.
More details, you can see “jobs.<job_id>.steps.run”. |
Beta Was this translation helpful? Give feedback.
-
We have a template file, so that people don’t accidentally check-in a config file. e.g. config.js.tmpl is in the repo, config.js is not (it’s in .gitignore) So I’m pretty sure I have to copy the config.js.tmpl first (or move it, to rename it). |
Beta Was this translation helpful? Give feedback.
This is a problem because when the repo is checked out, config.js doesn’t exist - config.js.tmpl does. So I had to add to the yaml file to copy the file and update it with the proper values.