我创建了一个非常简单的Django-React应用,该应用实际上仅显示主页。我使用了create-react-app。
当我键入 git push heroku master 时,我收到该错误:
View
flexDirection
:
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): 8.10.0
remote: engines.npm (package.json): 3.5.2
remote:
remote: Resolving node version 8.10.0...
remote: Downloading and installing node 8.10.0...
remote: Bootstrapping npm 3.5.2 (replacing 5.6.0)...
remote: npm 3.5.2 installed
remote:
remote: -----> Building dependencies
remote: Installing node modules (package.json)
remote: npm ERR! Linux 4.4.0-1031-aws
remote: npm ERR! argv "/tmp/build_0a81cf9bbf3f1ba3a96d3d0cf2296f25/.heroku/node/bin/node" "/tmp/build_0a81cf9bbf3f1ba3a96d3d0cf2296f25/.heroku/node/bin/npm" "install" "--production=false" "--unsafe-perm" "--userconfig" "/tmp/build_0a81cf9bbf3f1ba3a96d3d0cf2296f25/.npmrc"
remote: npm ERR! node v8.10.0
remote: npm ERR! npm v3.5.2
remote: npm ERR! code MODULE_NOT_FOUND
remote:
remote: npm ERR! Cannot find module 'internal/util/types'
remote: npm ERR!
remote: npm ERR! If you need help, you may report this error at:
remote: npm ERR! <https://github.com/npm/npm/issues>
remote:
remote: npm ERR! Please include the followingfile with any support request:
remote: npm ERR! /tmp/build_0a81cf9bbf3f1ba3a96d3d0cf2296f25/npm-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: Some possible problems:
remote:
remote: - A module may be missing from 'dependencies' in package.json
remote: https://devcenter.heroku.com/articles/troubleshooting-node-deploys#ensure-you-aren-t-relying-on-untracked-dependencies
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): 8.10.0
remote: engines.npm (package.json): 3.5.2
remote:
remote: Resolving node version 8.10.0...
remote: Downloading and installing node 8.10.0...
remote: Bootstrapping npm 3.5.2 (replacing 5.6.0)...
remote: npm 3.5.2 installed
remote:
remote: -----> Building dependencies
remote: Installing node modules (package.json)
remote: npm ERR! Linux 4.4.0-1031-aws
remote: npm ERR! argv "/tmp/build_0a81cf9bbf3f1ba3a96d3d0cf2296f25/.heroku/node/bin/node" "/tmp/build_0a81cf9bbf3f1ba3a96d3d0cf2296f25/.heroku/node/bin/npm" "install" "--production=false" "--unsafe-perm" "--userconfig" "/tmp/build_0a81cf9bbf3f1ba3a96d3d0cf2296f25/.npmrc"
remote: npm ERR! node v8.10.0
remote: npm ERR! npm v3.5.2
remote: npm ERR! code MODULE_NOT_FOUND
remote:
remote: npm ERR! Cannot find module 'internal/util/types'
remote: npm ERR!
remote: npm ERR! If you need help, you may report this error at:
remote: npm ERR! <https://github.com/npm/npm/issues>
remote:
remote: npm ERR! Please include the followingfile with any support request:
remote: npm ERR! /tmp/build_0a81cf9bbf3f1ba3a96d3d0cf2296f25/npm-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: Some possible problems:
remote:
remote: - A module may be missing from 'dependencies' in package.json
remote: https://devcenter.heroku.com/articles/troubleshooting-node-deploys#ensure-you-aren-t-relying-on-untracked-dependencies
我认为更改node.js的版本存在问题,但是我只是创建了这个简单的应用程序,并且出现了问题。