For my React app, my .env file has the following entry:
NODE_PATH=./src
This allows me to use absolute paths when importing packages.
In eslintrc.json, I have this configuration to handle eslint's import/no-unresolved rule:
"settings": { "import/resolver": { "node": { "paths": ["src"] } } },This set up works in my local environment.
However, when I push my code to Bitbucket, the build fails with this message:
error Unable to resolve path to module 'components/Header/Header' import/no-unresolved
Would anyone know how to solve this problem?
Thanks!
Fara