suwu150 2017-04-13 14:43 采纳率: 12.5%
浏览 2909

webpack打包出错,同一个项目在Linux中能够使用webpack,windows却不能

webpack打包出错,克隆的是同一个项目在Linux中能够使用webpack命令直接进行
打包,但是在windows10系统中却不能,在打包的时候出现如下错误:
E:\webStromProject\electronDesktopTool>webpack
Hash: 5f4db8ce4679dd9a03f4
Version: webpack 1.14.0
Time: 18782ms
Asset Size Chunks Chunk Names
bundle.js 5.89 MB 0 [emitted] main
+ 555 hidden modules

WARNING in ./~/express/lib/view.js
Critical dependencies:
42:48-69 the request of a dependency is an expression
@ ./~/express/lib/view.js 42:48-69

WARNING in ./~/ws/lib/BufferUtil.js
Module not found: Error: Cannot resolve module 'bufferutil' in E:\webStromProject\electronDesktopTool\node_modules\ws\lib
@ ./~/ws/lib/BufferUtil.js 31:21-42

WARNING in ./~/ws/lib/Validation.js
Module not found: Error: Cannot resolve module 'utf-8-validate' in E:\webStromProject\electronDesktopTool\node_modules\ws\lib
@ ./~/ws/lib/Validation.js 10:22-47

WARNING in ./~/formidable/lib/incoming_form.js
Critical dependencies:
1:43-50 require function is used in a way in which dependencies cannot be statically extracted
@ ./~/formidable/lib/incoming_form.js 1:43-50

WARNING in ./~/formidable/lib/querystring_parser.js
Critical dependencies:
1:43-50 require function is used in a way in which dependencies cannot be statically extracted
@ ./~/formidable/lib/querystring_parser.js 1:43-50

WARNING in ./~/formidable/lib/file.js
Critical dependencies:
1:43-50 require function is used in a way in which dependencies cannot be statically extracted
@ ./~/formidable/lib/file.js 1:43-50

ERROR in ./~/express/index.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./lib-cov/express in E:\webStromProject\electronDesktopTool\node_modules\express
@ ./~/express/index.js 3:4-32

ERROR in ./~/express/lib/view.js
Module not found: Error: Cannot resolve module 'fs' in E:\webStromProject\electronDesktopTool\node_modules\express\lib
@ ./~/express/lib/view.js 6:9-22

ERROR in ./~/connect/lib-cov/connect.js
Module not found: Error: Cannot resolve module 'fs' in E:\webStromProject\electronDesktopTool\node_modules\connect\lib-cov
@ ./~/connect/lib-cov/connect.js 32:162-175

ERROR in ./~/connect/lib/connect.js
Module not found: Error: Cannot resolve module 'fs' in E:\webStromProject\electronDesktopTool\node_modules\connect\lib
@ ./~/connect/lib/connect.js 18:9-22

ERROR in ./~/send/lib/send.js
Module not found: Error: Cannot resolve module 'fs' in E:\webStromProject\electronDesktopTool\node_modules\send\lib
@ ./~/send/lib/send.js 13:9-22

ERROR in ./~/connect/lib-cov/middleware/directory.js
Module not found: Error: Cannot resolve module 'fs' in E:\webStromProject\electronDesktopTool\node_modules\connect\lib-cov\middleware
@ ./~/connect/lib-cov/middleware/directory.js 71:9-22

ERROR in ./~/connect/lib-cov/middleware/errorHandler.js
Module not found: Error: Cannot resolve module 'fs' in E:\webStromProject\electronDesktopTool\node_modules\connect\lib-cov\middleware
@ ./~/connect/lib-cov/middleware/errorHandler.js 32:38-51

ERROR in ./~/connect/lib-cov/middleware/favicon.js
Module not found: Error: Cannot resolve module 'fs' in E:\webStromProject\electronDesktopTool\node_modules\connect\lib-cov\middleware
@ ./~/connect/lib-cov/middleware/favicon.js 21:9-22

ERROR in ./~/connect/lib/middleware/directory.js
Module not found: Error: Cannot resolve module 'fs' in E:\webStromProject\electronDesktopTool\node_modules\connect\lib\middleware
@ ./~/connect/lib/middleware/directory.js 17:9-22

ERROR in ./~/connect/lib/middleware/favicon.js
Module not found: Error: Cannot resolve module 'fs' in E:\webStromProject\electronDesktopTool\node_modules\connect\lib\middleware
@ ./~/connect/lib/middleware/favicon.js 13:9-22

ERROR in ./~/connect/lib/middleware/errorHandler.js
Module not found: Error: Cannot resolve module 'fs' in E:\webStromProject\electronDesktopTool\node_modules\connect\lib\middleware
@ ./~/connect/lib/middleware/errorHandler.js 13:9-22

ERROR in ./~/connect/lib-cov/middleware/cookieSession.js
Module not found: Error: Cannot resolve module 'crc' in E:\webStromProject\electronDesktopTool\node_modules\connect\lib-cov\middleware
@ ./~/connect/lib-cov/middleware/cookieSession.js 42:173-187

ERROR in ./~/connect/lib-cov/middleware/session.js
Module not found: Error: Cannot resolve module 'crc' in E:\webStromProject\electronDesktopTool\node_modules\connect\lib-cov\middleware
@ ./~/connect/lib-cov/middleware/session.js 92:310-324

ERROR in ./~/send/~/mime/mime.js
Module not found: Error: Cannot resolve module 'fs' in E:\webStromProject\electronDesktopTool\node_modules\send\node_modules\mime
@ ./~/send/~/mime/mime.js 2:9-22

  • 写回答

1条回答 默认 最新

  • 美酒没故事° 2023-09-07 16:32
    关注

    我是打包测试环境的时候https://ask.csdn.net/questions/7924110

    评论

报告相同问题?

悬赏问题

  • ¥15 oracle中sql查询问题
  • ¥15 vue使用gojs3.0版本,在nodeDataArray中的iconSrc使用gif本地路径,展示出来后动画是静态的,不是动态的
  • ¥100 代写个MATLAB代码,有偿
  • ¥15 ansys electronics 2021 R1安装报错,错误代码2,如图
  • ¥15 Dev-c++打字不出现中文,但出现日文
  • ¥30 搭建面包板由NE555N和SN74LS90N组成的计时电路时出了问题
  • ¥15 无源定位系统的时差估计误差标准差
  • ¥15 请问这个代码哪里有问题啊
  • ¥20 python--version在命令端输入结果Python is not defined怎么办?还有pip不是exe格式是不是没安装成功?
  • ¥15 通过GaussianView进行结构微调消除虚频