首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装react项目时在流浏览器中出错

安装react项目时在流浏览器中出错
EN

Stack Overflow用户
提问于 2020-04-02 18:02:05
回答 1查看 560关注 0票数 1

我正在用jenkins安装react项目,但每次jenkins都会出现这个问题:

代码语言:javascript
复制
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]

有人能帮我解决这个问题吗?注意到之前的构建最终工作了,并且没有任何变化。我试图重建一个旧的构建,但它现在也显示了相同的错误。

谢谢!

EN

回答 1

Stack Overflow用户

发布于 2021-05-01 11:25:18

您确定存在模块文件夹的resolve吗?

代码语言:javascript
复制
  resolve: {
    alias: {
        src: path.resolve(__dirname, '..', 'src')
    },
    extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'],
    modules :{
        node_modules: path.resolve(__dirname, '..', 'node_modules')
    }
},
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60988961

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档