我有 2 个并行运行的构建(针对build/server/
( target: 'node'
) 和build/client/
( target: 'web'
),所以不应该有文件交叉),有时(这是奇怪的部分 - 只是有时)我有以下内容:
WARNING in (webpack)-dev-server/~/socket.io-client/~/engine.io-client/~/ws/lib/BufferUtil.js
Module not found: Error: Cannot resolve 'file' or 'directory' ../build/Release/bufferutil in test/node_modules/webpack-dev-server/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/lib
@ (webpack)-dev-server/~/socket.io-client/~/engine.io-client/~/ws/lib/BufferUtil.js 8:19-57
WARNING in (webpack)-dev-server/~/socket.io-client/~/engine.io-client/~/ws/lib/BufferUtil.js
Module not found: Error: Cannot resolve 'file' or 'directory' ../build/default/bufferutil in test/node_modules/webpack-dev-server/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/lib
@ (webpack)-dev-server/~/socket.io-client/~/engine.io-client/~/ws/lib/BufferUtil.js 10:19-57
WARNING in (webpack)-dev-server/~/socket.io-client/~/engine.io-client/~/ws/lib/Validation.js
Module not found: Error: Cannot resolve 'file' or 'directory' ../build/Release/validation in test/node_modules/webpack-dev-server/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/lib
@ (webpack)-dev-server/~/socket.io-client/~/engine.io-client/~/ws/lib/Validation.js 8:19-57
WARNING in (webpack)-dev-server/~/socket.io-client/~/engine.io-client/~/ws/lib/Validation.js
Module not found: Error: Cannot resolve 'file' or 'directory' ../build/default/validation in test/node_modules/webpack-dev-server/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/lib
@ (webpack)-dev-server/~/socket.io-client/~/engine.io-client/~/ws/lib/Validation.js 10:19-57
ERROR in (webpack)-dev-server/~/socket.io-client/~/engine.io-client/~/xmlhttprequest/lib/XMLHttpRequest.js
Module not found: Error: Cannot resolve module 'fs' in test/node_modules/webpack-dev-server/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/xmlhttprequest/lib
@ (webpack)-dev-server/~/socket.io-client/~/engine.io-client/~/xmlhttprequest/lib/XMLHttpRequest.js 14:9-22
ERROR in (webpack)-dev-server/~/socket.io-client/~/engine.io-client/~/xmlhttprequest/lib/XMLHttpRequest.js
Module not found: Error: Cannot resolve module 'child_process' in test/node_modules/webpack-dev-server/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/xmlhttprequest/lib
@ (webpack)-dev-server/~/socket.io-client/~/engine.io-client/~/xmlhttprequest/lib/XMLHttpRequest.js 16:12-36
ERROR in (webpack)-dev-server/~/socket.io-client/~/engine.io-client/~/ws/lib/WebSocketServer.js
Module not found: Error: Cannot resolve module 'tls' in test/node_modules/webpack-dev-server/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/lib
@ (webpack)-dev-server/~/socket.io-client/~/engine.io-client/~/ws/lib/WebSocketServer.js 14:10-24
ERROR in (webpack)-dev-server/~/socket.io-client/~/engine.io-client/~/ws/lib/WebSocket.js
Module not found: Error: Cannot resolve module 'fs' in test/node_modules/webpack-dev-server/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/lib
@ (webpack)-dev-server/~/socket.io-client/~/engine.io-client/~/ws/lib/WebSocket.js 13:9-22
ERROR in (webpack)-dev-server/~/socket.io-client/~/engine.io-client/~/ws/~/options/lib/options.js
Module not found: Error: Cannot resolve module 'fs' in test/node_modules/webpack-dev-server/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/options/lib
@ (webpack)-dev-server/~/socket.io-client/~/engine.io-client/~/ws/~/options/lib/options.js 6:9-22
只有client
在server
.
我试图自己弄清楚但没有运气...... AFAIU有两个socket.io
版本用于不同的网络/节点目标,但不知何故他们搞砸了。