Closed 18945168 closed 5 years ago
Can you share some more context to when you are getting these warnings?
vue-cli dev project , when i import a module 'ws' , then npm run dev or npm start, it warning Critical dependency: the request of a dependency is an expression, if i remove 'ws', it recover and run correct
I think this is generated by WebPack when it tries to bundle a binary addon. ws
does not work in the browser, you should use the native WebSocket object. See the note here https://github.com/websockets/ws#ws-a-nodejs-websocket-library
thank you i'll try it ...
yes i just import ('ws'),,but not use it
WARNING Compiled with 2 warnings 11:32:56
warning in ./node_modules/node-gyp-build/index.js
13:9-32 Critical dependency: the request of a dependency is an expression
warning in ./node_modules/node-gyp-build/index.js
20:15-54 Critical dependency: the request of a dependency is an expression