Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/442.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript MERN Stack推送到heroku:![远程拒绝]主机->;主控(预接收)_Javascript_Node.js_Git_Express_Heroku - Fatal编程技术网

Javascript MERN Stack推送到heroku:![远程拒绝]主机->;主控(预接收)

Javascript MERN Stack推送到heroku:![远程拒绝]主机->;主控(预接收),javascript,node.js,git,express,heroku,Javascript,Node.js,Git,Express,Heroku,旁注:我已经用同样的方法部署了大约3次,现在突然它不起作用了。。。让我觉得有些东西是用heroku更新的???IDK 试图将我的MERN Stack应用程序推送到heroku,但出现错误,下面是我的package.json文件: { "name": "jordanwebsite", "version": "1.0.0", "description": "", "main": "server.js", "scripts": { "start": "node server

旁注:我已经用同样的方法部署了大约3次,现在突然它不起作用了。。。让我觉得有些东西是用heroku更新的???IDK

试图将我的MERN Stack应用程序推送到heroku,但出现错误,下面是我的package.json文件:

{
  "name": "jordanwebsite",
  "version": "1.0.0",
  "description": "",
  "main": "server.js",
  "scripts": {
    "start": "node server.js",
    "server": "nodemon server.js",
    "test": "echo \"Error: no test specified\" && exit 1",
    "client-install": "npm install --prefix client",
    "client": "npm start --prefix client",
    "dev": "concurrently \"npm run server\" \"npm run\tclient\"",
    "heroku-postbuild": "cd client && NPM_CONFIG_PRODUCTION=false npm install && npm run build"
  },
  "author": "Jordan Harris",
  "license": "ISC",
  "dependencies": {
    "axios": "^0.18.0",
    "body-parser": "^1.18.3",
    "concurrently": "^4.1.0",
    "express": "^4.16.4",
    "nodemon": "^1.18.9"
  }
}
以下是日志:

$ git push heroku master
Enumerating objects: 40, done.
Counting objects: 100% (40/40), done.
Delta compression using up to 8 threads
Compressing objects: 100% (38/38), done.
Writing objects: 100% (40/40), 2.39 MiB | 637.00 KiB/s, done.
Total 40 (delta 0), 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):  unspecified
remote:        engines.npm (package.json):   unspecified (use default)
remote:
remote:        Resolving node version 10.x...
remote:        Downloading and installing node 10.15.1...
remote:        Using default npm version: 6.4.1
remote:
remote: -----> Building dependencies
remote:        Installing node modules (package.json)
remote:
remote:        > nodemon@1.18.9 postinstall /tmp/build_1c67c2822e7364298c69e79a4318103a/node_modules/nodemon
remote:        > node bin/postinstall || exit 0
remote:
remote:        Love nodemon? You can now support the project via the open collective:
remote:         > https://opencollective.com/nodemon/donate
remote:
remote:        added 340 packages from 197 contributors and audited 2497 packages in
10.466s
remote:        found 0 vulnerabilities
remote:
remote:        Running heroku-postbuild
remote:
remote:        > jordanwebsite@1.0.0 heroku-postbuild /tmp/build_1c67c2822e7364298c69e79a4318103a
remote:        > cd client && NPM_CONFIG_PRODUCTION=false npm install && npm run build
remote:
remote:        added 1963 packages from 688 contributors and audited 35917 packages in 45.094s
remote:        found 0 vulnerabilities
remote:
remote:
remote:        > client@0.1.0 build /tmp/build_1c67c2822e7364298c69e79a4318103a/client
remote:        > react-scripts build
remote:
remote:        Creating an optimized production build...
remote:        Failed to compile.
remote:
remote:        Failed to minify the bundle. Error: static/js/main.4d56311f.chunk.js from Terser
remote:        TypeError: Cannot read property 'minify' of undefined
remote:            at compiler.run (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/react-scripts/scripts/build.js:169:23)
remote:            at finalCallback (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/webpack/lib/Compiler.js:210:39)
remote:            at hooks.done.callAsync.err (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/webpack/lib/Compiler.js:226:13)
remote:            at AsyncSeriesHook.eval [as callAsync] (eval at create (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:6:1)
remote:            at AsyncSeriesHook.lazyCompileHook (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/tapable/lib/Hook.js:154:20)
remote:            at onCompiled (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/webpack/lib/Compiler.js:224:21)
remote:            at hooks.afterCompile.callAsync.err (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/webpack/lib/Compiler.js:553:14)
remote:            at AsyncSeriesHook.eval [as callAsync] (eval at create (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:6:1)
remote:            at AsyncSeriesHook.lazyCompileHook (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/tapable/lib/Hook.js:154:20)
remote:            at compilation.seal.err (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/webpack/lib/Compiler.js:550:30)
remote:            at AsyncSeriesHook.eval [as callAsync] (eval at create (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:6:1)
remote:            at AsyncSeriesHook.lazyCompileHook (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/tapable/lib/Hook.js:154:20)
remote:            at hooks.optimizeAssets.callAsync.err (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/webpack/lib/Compilation.js:1295:35)
remote:            at AsyncSeriesHook.eval [as callAsync] (eval at create (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:6:1)
remote:            at AsyncSeriesHook.lazyCompileHook (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/tapable/lib/Hook.js:154:20)
remote:            at hooks.optimizeChunkAssets.callAsync.err (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/webpack/lib/Compilation.js:1286:32)
remote:
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 1
remote: npm ERR! client@0.1.0 build: `react-scripts build`
remote: npm ERR! Exit status 1
remote: npm ERR!
remote: npm ERR! Failed at the client@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.tUXJH/_logs/2019-02-03T01_53_57_344Z-debug.log
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 1
remote: npm ERR! jordanwebsite@1.0.0 heroku-postbuild: `cd client && NPM_CONFIG_PRODUCTION=false npm install && npm run build`
remote: npm ERR! Exit status 1
remote: npm ERR!
remote: npm ERR! Failed at the jordanwebsite@1.0.0 heroku-postbuild 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.tUXJH/_logs/2019-02-03T01_53_57_358Z-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:        - Node version not specified in package.json
remote:          https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
remote:
remote:        Love,
remote:        Heroku
remote:
remote:  !     Push rejected, failed to compile Node.js app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to jorrharris-website.
remote:
To https://git.heroku.com/jorrharris-website.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/jorrharris-website.git'
$git推送heroku主机
枚举对象:40,完成。
计数对象:100%(40/40),完成。
增量压缩最多使用8个线程
压缩对象:100%(38/38),完成。
写入对象:100%(40/40),2.39mib | 637.00kib/s,完成。
总计40(增量0),重复使用0(增量0)
远程:正在压缩源文件。。。完成。
远程:建筑源:
远程:
远程:-->Node.js应用程序检测到
远程:
远程:-->创建运行时环境
远程:
远程:NPM\u配置\u日志级别=错误
远程:节点_ENV=生产
远程:节点\模块\缓存=真
远程:节点\u VERBOSE=false
远程:
远程:-->安装二进制文件
远程:engines.node(package.json):未指定
remote:engines.npm(package.json):未指定(使用默认值)
远程:
远程:正在解析节点版本10.x。。。
远程:下载和安装节点10.15.1。。。
远程:使用默认npm版本:6.4.1
远程:
远程:-->生成依赖项
远程:安装节点模块(package.json)
远程:
远程:>nodemon@1.18.9安装后/tmp/构建\u 1c67c2822e7364298c69e79a4318103a/节点\u模块/nodemon
远程:>节点箱/后安装| |退出0
远程:
遥控器:爱小精灵?现在,您可以通过open Collection支持该项目:
远程:>https://opencollective.com/nodemon/donate
远程:
远程:添加了来自197个贡献者的340个包,并在中审核了2497个包
10.466s
远程:发现0个漏洞
远程:
远程:运行heroku后期生成
远程:
远程:>jordanwebsite@1.0.0heroku postbuild/tmp/build_1c67c2822e7364298c69e79a4318103a
远程:>cd客户端和NPM\u配置\u生产=错误的NPM安装和NPM运行生成
远程:
远程:添加了688个贡献者的1963个包,并在45.094s中审核了35917个包
远程:发现0个漏洞
远程:
远程:
远程:>client@0.1.0build/tmp/build_1c67c2822e7364298c69e79a4318103a/客户
远程:>react脚本生成
远程:
远程:正在创建优化的生产版本。。。
远程:未能编译。
远程:
远程:未能缩小捆绑包。错误:来自Terser的static/js/main.4d56311f.chunk.js
远程:TypeError:无法读取未定义的属性“minify”
远程:在compiler.run(/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/react scripts/scripts/build.js:169:23)
远程:在finalCallback(/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/webpack/lib/Compiler.js:210:39)
远程:在hooks.done.callAsync.err(/tmp/build\u 1c67c2822e7364298c69e79a4318103a/client/node\u modules/webpack/lib/Compiler.js:226:13)
远程:在AsyncSeriesHook.eval[as callAsync](在创建时进行评估(/tmp/build\u 1c67c2822e7364298c69e79a4318103a/client/node\u modules/tapable/lib/HookCodeFactory.js:32:10),:6:1)
远程:在AsyncSeriesHook.lazycomilehook(/tmp/build\u 1c67c2822e7364298c69e79a4318103a/client/node\u modules/tapable/lib/Hook.js:154:20)
远程:在未编译时(/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/webpack/lib/Compiler.js:224:21)
远程:在hooks.afterCompile.callAsync.err(/tmp/build\u 1c67c2822e7364298c69e79a4318103a/client/node\u modules/webpack/lib/Compiler.js:553:14)
远程:在AsyncSeriesHook.eval[as callAsync](在创建时进行评估(/tmp/build\u 1c67c2822e7364298c69e79a4318103a/client/node\u modules/tapable/lib/HookCodeFactory.js:32:10),:6:1)
远程:在AsyncSeriesHook.lazycomilehook(/tmp/build\u 1c67c2822e7364298c69e79a4318103a/client/node\u modules/tapable/lib/Hook.js:154:20)
远程:位于compilation.seal.err(/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/webpack/lib/Compiler.js:550:30)
远程:在AsyncSeriesHook.eval[as callAsync](在创建时进行评估(/tmp/build\u 1c67c2822e7364298c69e79a4318103a/client/node\u modules/tapable/lib/HookCodeFactory.js:32:10),:6:1)
远程:在AsyncSeriesHook.lazycomilehook(/tmp/build\u 1c67c2822e7364298c69e79a4318103a/client/node\u modules/tapable/lib/Hook.js:154:20)
远程:在hooks.optimizeAssets.callAsync.err(/tmp/build\u 1c67c2822e7364298c69e79a4318103a/client/node\u modules/webpack/lib/Compilation.js:1295:35)
远程:在AsyncSeriesHook.eval[as callAsync](在创建时进行评估(/tmp/build\u 1c67c2822e7364298c69e79a4318103a/client/node\u modules/tapable/lib/HookCodeFactory.js:32:10),:6:1)
远程:在AsyncSeriesHook.lazycomilehook(/tmp/build\u 1c67c2822e7364298c69e79a4318103a/client/node\u modules/tapable/lib/Hook.js:154:20)
远程:在hooks.optimizeChunkAssets.callAsync.err(/tmp/build咷1c67c2822e7364298c69e79a4318103a/client/node咹modules/webpack/lib/Compilation.js:1286:32)
远程:
远程:npm错误!代码失效循环
远程:npm错误!错误1
远程:npm错误!client@0.1.0build:`react脚本build`
远程:npm错误!退出状态1
远程:npm错误!
远程:npm错误!失败client@0.1.0构建脚本。
远程:npm错误!这可能不是npm的问题。可能还有其他的问题
上面的日志输出。
远程:
远程:npm错误!此运行的完整日志可在以下位置找到:
远程:npm错误/tmp/npmcache.tUXJH//u logs/2019-02-03T01_53_57_344Z-debug.log
远程:npm错误!代码失效循环
远程:npm错误!错误1
远程:npm错误!jordanwebsite@1.0.0heroku postbuild:`cd客户端和NPM配置和生产=错误的NPM安装和NPM运行生成`
远程:npm错误!退出状态1
远程:npm错误!
远程:npm错误!失败jordanwebsite@1.0.0heroku后期构建脚本。
远程:npm错误
remote:        packages or subtle bugs in production.
remote: 
remote:        - To use npm to install your application's dependencies please delete
remote:          the yarn.lock file.
remote: 
remote:          $ git rm yarn.lock
remote: 
remote:        - To use yarn to install your application's dependences please delete
remote:          the package-lock.json file.
remote: 
remote:          $ git rm package-lock.json
remote:     
remote:        https://help.heroku.com/0KU2EM53
remote: 
remote:  !     Push rejected, failed to compile Node.js app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected to elevaform.
remote: