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,
My builds fail due to:
Run npm run build --if-present > email@example.com build /home/runner/work/o-fish-web/o-fish-web > react-scripts build Creating an optimized production build... Failed to compile. ./src/services/stitch.service.js Cannot find file '../config' in './src/services'.
The specific line in src/services/stitch.service.js is:
import config from “…/config”;
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:
What am I missing?
If you need insight into the repository, it’s at
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!