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

Chapter 2 - deleting yarn.lock breaks the packages #18

Open
citypaul opened this issue Jan 12, 2021 · 2 comments
Open

Chapter 2 - deleting yarn.lock breaks the packages #18

citypaul opened this issue Jan 12, 2021 · 2 comments

Comments

@citypaul
Copy link

I've tested this and it does seem to the case at the moment that if you follow the advice in chapter 2, "First, stop both of the development servers and remove the node_modules directories and yarn.lock files.", deleting the yarn.lock files and doing a yarn at the time of writing breaks the packages.

The error I get when doing this is: TypeError: Cannot read property 'Compilation' of undefined.

If I bring back the original yarn.lock, everything works as expected.

@citypaul
Copy link
Author

Note - the above occurs when using the npx command, eg: npx degit git@github.com:jherr/wp5-starter-react.git#main home. If you remove the yarn.lock here and do a yarn, you should probably see the issue.

However, the code in chapter2/ inside this repo has different dependencies to the starter code, and inside this repo you can currently delete yarn.lock and yarn still works. The difference in dependencies between the starter pack and your repo here probably wants looking at, because the difference setup creates different results and can be confusing.

@shaohaolin
Copy link

One way to solve this is by copying the yarn.lock file created using npx degit git@github.com:jherr/wp5-starter-react.git#main home and paste it at the root level folder.

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

No branches or pull requests

2 participants