-
-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Description
Can you reproduce the problem with latest npm?
Yes. I'm on Node 7.2.0, npm 3.10.9.
Description
I'm working on two projects at the same time, both generated with create-react-app
. One exports a React component that's used by the other, so I'd like create a symlink between the two. I ran npm link
within the master project and then npm link mapbook
(where mapbook
is the name of the project) in the client. Then in index.js
for the client I have:
import Mapbook from 'mapbook'
Expected behavior
When I run npm run start
, I'm expecting the module to be imported without any errors.
Actual behavior
Instead I get:
Error in ./src/index.js
Module not found: 'mapbook' in /home/ubuntu/workspace/atlas-mapbook/src
Not sure why it's not seeing the symlink in node_modules
. If I change the import
/export
statements to CommonJS and simply node index.js
it works fine, so I don't think it's a permissions issue.
Environment
Run these commands in the project folder and fill in their results:
-
npm ls react-scripts
(if you haven’t ejected):[email protected] /home/ubuntu/workspace/atlas-mapbook
└── [email protected] -
node -v
:v7.2.0
-
npm -v
:3.10.9
Then, specify:
- Operating system: Ubuntu 16.04 on Cloud9; NVM preinstalled
- Browser and version: n/a
Reproducible Demo
https://github.com/rbrtmrtn/create-react-app-issue
Thanks for any suggestions!