Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken when used with lerna bootstrap --hoist #65

Closed
andreigec opened this issue Aug 4, 2017 · 6 comments
Closed

Broken when used with lerna bootstrap --hoist #65

andreigec opened this issue Aug 4, 2017 · 6 comments

Comments

@andreigec
Copy link

andreigec commented Aug 4, 2017

Lerna bootstrap --hoist moves all shared node_modules deps of packages into the lerna root directory.

react-app-rewired (RAR) is building the create react app (CRA) webpack path from cwd of the project being built, which node_modules folder won't have either CRA or RAR, so it chokes.

Will need to resolve CRA's webpack config from RAR's node modules location.
build.js -
const webpackConfig = paths.scriptVersionDir + '/config/webpack.config.prod';

@timarney
Copy link
Owner

timarney commented Aug 4, 2017

Adding this as a note on this issue.

https://github.com/lerna/lerna/blob/master/doc/hoist.md

@aaronjensen
Copy link

This is also broken w/ yarn workspaces (same thing, basically)

@aaronjensen
Copy link

For now, we're doing this after our yarn install/lerna bootstrap:

ln -s ../../../node_modules/react-scripts packages/our-app/node_modules/react-scripts

@timarney
Copy link
Owner

timarney commented Dec 2, 2017

Also facebook/create-react-app#3435

@timarney
Copy link
Owner

Happy to accept a PR on this ...

Going to close concluding #65 (comment) as a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants