question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Webpack dependency warnings in 0.3.22

See original GitHub issue

Hey,

after upgrading to 0.3.22 I get two webpack warnings, that I’ve never seen before. I’m using create-react-app to build my React app.

Compiled with warnings.

./node_modules/peerjs/dist/peerjs.min.js
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

./node_modules/peerjs/dist/peerjs.min.js
Critical dependency: the request of a dependency is an expression

Unfortunately there are no line numbers in the output and I don’t know enough about the webpack process to narrow this down. Also googling leads to many different causes for these warnings. Can anyone point me in the right direction, where these warnings come from?

Thanks!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
kidandcatcommented, Feb 21, 2019

It is probably coming from how parcel is bundling the package and dependencies, it is probably doing something like require(package) where:

for(p of packages){
  require(p)
}

And webpack don’t like that because he cannot find which dependency is trying to be loaded.

Anyway webpack shouldn’t be analyzing node_modules. So yes, it comes from webpack, but it is probably caused by the create-react-app’s webpack configuration.

So you may fix it if you do an eject and plays with the webpack configuration.

PD: if you have time, I recommend you to try to switch to parcel, I’ve moved enormous projects with tons of webpack plugins into parcel in a matter of 2-3 days. (I know parcel very well)

0reactions
kidandcatcommented, Mar 11, 2019

I’m closing this as the issue is not in PeerJS

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Prevent Webpack Error after npm Install?
I was working on a project, and everything was going good, until I did npm install . Then, Webpack throws the following error:...
Read more >
3 warnings in child compilations (use 'stats.children: true' resp ...
Solution 1: Add stats.children: true In order to solve this warning you just need to add stats.children: true in your webpack.mix.js file. First...
Read more >
Stats Data - webpack
webpack is a module bundler. ... The stringified raw source "warnings": 0 // Number of warnings when resolving or processing the module }....
Read more >
license-webpack-plugin | Yarn - Package Manager
No explicit configuration is necessary anymore. · There is no dependency on ejs anymore. · Packages are identified by traversing dictories upward until...
Read more >
Dependencies | @backstage/cli | npm - Open Source Insights
arrow_right @babel/core. 7.20.5 Notes Version 7.20.5 Published November 28... arrow_right @babel/plugin‑transform‑modules‑commonjs. 7.19.6 Notes Version 7.19.6 Published October 20, 20...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found