prebuild / node-gyp-build

Build tool and bindings loader for node-gyp that supports prebuilds
MIT License
104 stars 37 forks source link

warning in ./node_modules/node-gyp-build/index.js #7

Closed 18945168 closed 5 years ago

18945168 commented 6 years ago

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

mafintosh commented 6 years ago

Can you share some more context to when you are getting these warnings?

18945168 commented 6 years ago

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

18945168 commented 6 years ago

https://www.npmjs.com/package/ws

lpinca commented 6 years ago

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

18945168 commented 6 years ago

thank you i'll try it ...

18945168 commented 6 years ago

yes i just import ('ws'),,but not use it