在heroku上部署时找不到react-bootstrap模块

时间:2020-02-19 18:41:05

标签: javascript reactjs heroku react-bootstrap

我正在尝试在Heroku上部署我的react应用程序,但我不断收到此错误:

找不到模块:错误:无法解析'/ tmp / build_587ed15992b6e42ca234a30b1b616160 / src / components'中的'react-bootstrap / Carousel'

我发现了这个问题:Module not found Error when deployed on Heroku ...但是这里的大小写敏感性问题似乎不是问题,因为我完全按照react-bootstrap:https://react-bootstrap.github.io/components/carousel/

这是我第一次尝试在Heroku上进行部署,感谢您的帮助!

这是完整的构建日志:

Enumerating objects: 71, done.
Counting objects: 100% (71/71), done.
Delta compression using up to 8 threads
Compressing objects: 100% (70/70), done.
Writing objects: 100% (71/71), 244.98 KiB | 5.44 MiB/s, done.
Total 71 (delta 27), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Node.js app detected
remote:        
remote: -----> Creating runtime environment
remote:        
remote:        NPM_CONFIG_LOGLEVEL=error
remote:        NODE_ENV=production
remote:        NODE_MODULES_CACHE=true
remote:        NODE_VERBOSE=false
remote:        
remote: -----> Installing binaries
remote:        engines.node (package.json):  12.12.0
remote:        engines.npm (package.json):   6.12.0
remote:        
remote:        Resolving node version 12.12.0...
remote:        Downloading and installing node 12.12.0...
remote:        Bootstrapping npm 6.12.0 (replacing 6.11.3)...
remote:        npm 6.12.0 installed
remote:        
remote: -----> Installing dependencies
remote:        Installing node modules (package.json + package-lock)
remote:        
remote:        > core-js@2.6.9 postinstall /tmp/build_a444525ab5996c219b5538f41fdd646b/node_modules/core-js
remote:        > node scripts/postinstall || echo "ignore"
remote:        
remote:        
remote:        > uglifyjs-webpack-plugin@0.4.6 postinstall /tmp/build_a444525ab5996c219b5538f41fdd646b/node_modules/uglifyjs-webpack-plugin
remote:        > node lib/post_install.js
remote:        
remote:        added 1402 packages from 852 contributors and audited 15016 packages in 31.035s
remote:        found 32 vulnerabilities (29 low, 1 moderate, 2 high)
remote:          run `npm audit fix` to fix them, or `npm audit` for details
remote:        
remote: -----> Build
remote:        Running build
remote:        
remote:        > ecommerce-react-graphql-stripe@0.1.0 build /tmp/build_a444525ab5996c219b5538f41fdd646b
remote:        > react-scripts build
remote:        
remote:        Creating an optimized production build...
remote:        Failed to compile.
remote:        
remote:        Module not found: Error: Can't resolve 'react-bootstrap/Carousel' in '/tmp/build_a444525ab5996c219b5538f41fdd646b/src/components'
remote:        
remote:        
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 1
remote: npm ERR! ecommerce-react-graphql-stripe@0.1.0 build: `react-scripts build`
remote: npm ERR! Exit status 1
remote: npm ERR! 
remote: npm ERR! Failed at the ecommerce-react-graphql-stripe@0.1.0 build script.
remote: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
remote: 
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR!     /tmp/npmcache.j8Q79/_logs/2020-02-16T16_55_24_218Z-debug.log
remote: 
remote: -----> Build failed
remote:        
remote:        We're sorry this build is failing! You can troubleshoot common issues here:
remote:        https://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:        
remote:        If you're stuck, please submit a ticket so we can help:
remote:        https://help.heroku.com/
remote:        
remote:        Love,
remote:        Heroku
remote:        
remote:  !     Push rejected, failed to compile Node.js app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...

0 个答案:

没有答案