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
warning in ./node_modules/peerjs/dist/peerjs.min.js Critical dependency: the request of a dependency is an expression #630
Comments
Similar to #537 |
I'm also having this issue when using create-react-app with peerjs. |
I am having this issue as well with both peerjs v0.3.18 and latest version. "react": "^16.13.1" |
I'm also having this issue when using: {
"peerjs": "^1.3.1",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.12"
} |
I might be wrong, but I believe it's recommended to install webpack-cli globally and not as part of a project |
Thank you! |
I am getting the same warning in create-react-app .. Any updates? for some reason, I am getting |
Still getting this issue over here. |
I have this issue too 😔 |
I have this issue |
Me toooo. |
same here |
What I ended up doing was to remove the peerjs import from App.js and Include a script tag in my index.html file. For eslint, I added /* eslint-disable no-undef */ at the top of the file. |
I have this issue too. Peerjs is not working with Angular? Does not PeerJs support Angular, or wont? |
Is it still not fixed? This warning is so annoying. WARNING: I am using "peerjs": "^1.3.2" with ReactJS (create-react-app) |
For anyone landing on this issue, I came up with a possible (not so clean) solution last night: have you ever heard of Keep in mind that the solution shown below works with Update 08/09/2021Updated patch file to peerjs+1.3.2.patch.zip TL;DR
WhyFirst of all: because that warning during the compilation of my project with Webpack is quite annoying. Secondly: there is no real need for PeerJS to be compiled with Parcel, unless you're planning to build your project with Parcel as well but the majority of projects don't. Also, I'm wondering why the authors of this library are not going to provide support for multiple compiled versions of the library. This way, if a developer needs to use this package inside a bundled project, they would be free to import it as a normal ES5 library. They would still be free to import the minified bundled version as well. HowI'm going to provide you the steps behind that patch, in order to let anyone better understand how it's been made.
|
Hi, @Pigotz I'm using react v17, peerjs v1.3.2, patch-package v6.4.7 |
@siddharthmagadum16 you're right, try this other patch: peerjs+1.3.2.patch.zip |
@Pigotz Yes, it works, thank you! |
hey @Pigotz I got an error after removing node_modules and
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library! The project needs your help! Please consider supporting of core-js:
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)
patch-package 6.4.7 npm ERR! A complete log of this run can be found in: package.json: |
Hey @Hashen110 👋 There seems to be an issue inside your {
"scripts": {
"lint": "eslint --ext .js,.vue ./",
"test": "echo \"No test specified\" && exit 0",
"postinstall": "patch-package"
},
"dependencies": {
"@quasar/extras": "^1.0.0",
"axios": "^0.21.1",
"core-js": "^3.6.5",
"peerjs": "^1.3.2",
"quasar": "^2.0.0",
"socket.io-client": "^4.3.2",
"socket.io-msgpack-parser": "^3.0.1"
},
"devDependencies": {
"@babel/eslint-parser": "^7.13.14",
"@quasar/app": "^3.0.0",
"eslint": "^7.14.0",
"eslint-config-standard": "^16.0.2",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-vue": "^7.0.0",
"eslint-webpack-plugin": "^2.4.0",
"patch-package": "^6.4.7"
},
"browserslist": [
"last 30 Chrome versions",
"last 30 Firefox versions",
"last 12 Edge versions",
"last 21 Safari versions",
"last 24 Android versions",
"last 24 ChromeAndroid versions",
"last 24 FirefoxAndroid versions",
"last 30 iOS versions",
"last 15 Opera versions"
],
"engines": {
"node": ">= 12.22.1",
"npm": ">= 6.13.4",
"yarn": ">= 1.21.1"
}
} The command |
@Pigotz It works :) patch-package 6.4.7 Thank you for the quick response |
- peers/peerjs#630 (comment) - 해당 링크 참고하여 경고 뜨는 부분을 수정하였습니다.
If you are using peerjs with typescript , import from source directly may resolve the issue import { Peer } from 'peerjs/lib/peer'
const local = new Peer() This work fine for me |
To fix this problem I added this to my webpack config: module.exports = {
module: {
exprContextCritical: false
}
} This solve the warning but I'm not sure if |
This work fine in Javascript |
@apare Here my use with a more restricted application: new webpack.ContextReplacementPlugin(/peerjs/, (context) => {
context.dependencies[0].critical = false;
return context;
}), |
Should be fixed in peerjs@beta |
question: > warn - ./node_modules/peerjs/dist/peerjs.min.js > Critical dependency: the request of a dependency is an expression link to: peers/peerjs#630 (comment)
My testing-app is compiling fine, except that I get this warning:
" Critical dependency: the request of a dependency is an expression"
This is webpack.config.js :
Any ideas about how to solve it?
The text was updated successfully, but these errors were encountered: