-
Notifications
You must be signed in to change notification settings - Fork 68
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
Warnings about missing package.json with webpack 5 #203
Comments
Are you using yarn or npm? We've seen yarn clean up node_modules aggressively. |
I'm using yarn 2 berry. I have no issues with other typings though |
You might try this technique: #126 (comment) |
Having the same issue using npm and webpack 5 The warnings are slightly more descriptive now:
Which hints that webpack expects a package.json in each node_modules subfolder. See https://webpack.js.org/configuration/other-options/#managedpaths and https://webpack.js.org/configuration/cache/#cachemanagedpaths. The error comes from https://github.com/webpack/webpack/blob/4a0937fdd0701793a6546f8670e3eed5e552ae50/lib/FileSystemInfo.js#L3518 and it seems to require the following from package.json:
I believe it should be the responsibiltiy of https://github.com/danmarshall/indefinitely-typed to generate a package.json if the user doesn't provide one. After all, indefinitely-typed ensures that each of these folders looks like a package, even if they aren't. |
@JannikGM can you file this issue at https://github.com/danmarshall/indefinitely-typed ? |
I'm using webpack 5 to run my project and I'm gettings these warnings every build. Everything works but I'm wondering if I can get them away.
The text was updated successfully, but these errors were encountered: