Open svenkanna opened 6 years ago
@svenkanna hmm..
It's weird. Do you have .env
file in the root of repo?
.env
file is required and NODE_PATH=./src
should exist.
One more question, which node/npm version do you use?
I have the similar issue with, Can't resolve 'components/AuthForm' in 'xx/xx/xxx/react-reduction/src'
And yes, I have .env
file with NODE_PATH=./src
Node : 10.1.0 NPM: 6.4.1
Even I have the same error.
I found the following error after cloning the code and running npm run start. ./src/App.js Module not found: Can't resolve 'components/GAListener' in 'xx/xxx/xxx/react-reduction/src/'
However the file does exists but I am not able to find why the error is coming. I tried it on two machines. Both had the problem. Initially I thought it could be machine specific but getting the same error on both the machines, triggered me think that the problem could be something else.
it's just file import error, you have to import file properly like ./ notation
Looks like you are running this on windows, hence the path is unresolved. To resolve this install the package cross-env add the below into the package.jon for the start and build "start": "cross-env NODE_PATH=./src react-scripts start", "build": "cross-env NODE_PATH=./src react-scripts build",
I found the following error after cloning the code and running npm run start. ./src/App.js Module not found: Can't resolve 'components/GAListener' in 'xx/xxx/xxx/react-reduction/src/'
However the file does exists but I am not able to find why the error is coming. I tried it on two machines. Both had the problem. Initially I thought it could be machine specific but getting the same error on both the machines, triggered me think that the problem could be something else.