我有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
版本用于不同的网络/节点目标,不知何故它们搞砸了。