CircleCI Build Failing, Module not found, even with NODE_PATH

Hello, awesome people from the CircleCI community. I’m fairly new at CircleCI build config and things like that and is stuck with my build failing with Module not found, for days now.

I did some research, and added NODE_PATH=./src in package.json build scripts, even tried creating .env file with NODE_PATH=src, both method works locally, but the committed repository on CircleCI is always failing. I even tried changing the code imports from absolute path to relative path, still no luck. Tried all variations of NODE_PATH=./src everything works locally, but not on CircleCI. Even tried setting environment on config.yml. Any ideas? I’m at my wit’s end.

- run:
name: (Production) Build
command: npm run build

Please check [ for more information. Thank you very much.

1 Like

I wonder if it would help if NODE_PATH was absolute and not relative?

(Your link is broken, by the way - would you repair?)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.