我正在用jenkins安装react项目,但每次jenkins都会出现这个问题:
ERROR in ./~/stream-browserify/index.js
Module not found: Error: Can't resolve 'readable-stream/writable.js' in '/data/jenkins/workspace/CHR_CAT_COLLECTE_FRONT/node_modules/stream-browserify'
@ ./~/stream-browserify/index.js 29:18-56
@ ./~/browserify-sign/browser/index.js
@ ./~/crypto-browserify/index.js
@ ./~/react-tooltip/dist/index.es.js
@ ./src/components/modules/tournees-collecte/TableResultatRechercheTournee.tsx
@ ./src/components/modules/tournees-collecte/ModuleTourneesCollecte.tsx
@ ./src/components/App.tsx
@ ./src/Index.tsx
ERROR in ./~/stream-browserify/index.js
Module not found: Error: Can't resolve 'readable-stream/duplex.js' in '/data/jenkins/workspace/CHR_CAT_COLLECTE_FRONT/node_modules/stream-browserify'
@ ./~/stream-browserify/index.js 30:16-52
@ ./~/browserify-sign/browser/index.js
@ ./~/crypto-browserify/index.js
@ ./~/react-tooltip/dist/index.es.js
@ ./src/components/modules/tournees-collecte/TableResultatRechercheTournee.tsx
@ ./src/components/modules/tournees-collecte/ModuleTourneesCollecte.tsx
@ ./src/components/App.tsx
@ ./src/Index.tsx
ERROR in ./~/stream-browserify/index.js
Module not found: Error: Can't resolve 'readable-stream/transform.js' in '/data/jenkins/workspace/CHR_CAT_COLLECTE_FRONT/node_modules/stream-browserify'
@ ./~/stream-browserify/index.js 31:19-58
@ ./~/browserify-sign/browser/index.js
@ ./~/crypto-browserify/index.js
@ ./~/react-tooltip/dist/index.es.js
@ ./src/components/modules/tournees-collecte/TableResultatRechercheTournee.tsx
@ ./src/components/modules/tournees-collecte/ModuleTourneesCollecte.tsx
@ ./src/components/App.tsx
@ ./src/Index.tsx
ERROR in ./~/stream-browserify/index.js
Module not found: Error: Can't resolve 'readable-stream/passthrough.js' in '/data/jenkins/workspace/CHR_CAT_COLLECTE_FRONT/node_modules/stream-browserify'
@ ./~/stream-browserify/index.js 32:21-62
@ ./~/browserify-sign/browser/index.js
@ ./~/crypto-browserify/index.js
@ ./~/react-tooltip/dist/index.es.js
@ ./src/components/modules/tournees-collecte/TableResultatRechercheTournee.tsx
@ ./src/components/modules/tournees-collecte/ModuleTourneesCollecte.tsx
@ ./src/components/App.tsx
@ ./src/Index.tsx
Child html-webpack-plugin for "index.html":
[0] ./~/lodash/lodash.js 541 kB {0} [built]
[1] ./~/html-webpack-plugin/lib/loader.js!./src/index.html 532 bytes {0} [built]
[2] (webpack)/buildin/global.js 509 bytes {0} [built]
[3] (webpack)/buildin/module.js 517 bytes {0} [built]
WARNING in DedupePlugin: This plugin was removed from webpack. Remove it from your configuration.
Child html-webpack-plugin for "index.html":
[0] ./~/lodash/lodash.js 541 kB {0} [built]
[1] ./~/html-webpack-plugin/lib/loader.js!./src/index-prod.html 642 bytes {0} [built]
[2] (webpack)/buildin/global.js 509 bytes {0} [built]
[3] (webpack)/buildin/module.js 517 bytes {0} [built]有人能帮我解决这个问题吗?注意到之前的构建最终工作了,并且没有任何变化。我试图重建一个旧的构建,但它现在也显示了相同的错误。
谢谢!
发布于 2021-05-01 11:25:18
您确定存在模块文件夹的resolve吗?
resolve: {
alias: {
src: path.resolve(__dirname, '..', 'src')
},
extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'],
modules :{
node_modules: path.resolve(__dirname, '..', 'node_modules')
}
},https://stackoverflow.com/questions/60988961
复制相似问题