你好我创建了Quasar App-网站尝试将其推送到Heroku并显示“推送失败”为控制台提供错误

如何解决你好我创建了Quasar App-网站尝试将其推送到Heroku并显示“推送失败”为控制台提供错误

我正在尝试将git推送到Heroku,但最后却给出了错误。我了解了部署项目的控制台,因为我知道警告对于崩溃整个应用程序而言并不重要。当我浏览控制台时,我发现严重错误是

quasar: not found
error Command failed with exit code 127.  

据我所知,npm或yarn包有问题,但实际上并不确切知道什么。我在json文件中指定了我拥有的节点的相同版本和我在计算机上拥有的相同版本的npm。我不使用毛线,这可能是个问题吗?

这是我的json

{
  "name": "portfolio","version": "0.0.1","description": "A Quasar Framework app","productName": "Eldar Tailov","author": "'Eldar' <'tailov47@gmail.com'>","private": true,"scripts": {
    "build": "quasar build","start": "node server.js","heroku-postbuild": "yarn && yarn build"
  },"dependencies": {
    "@quasar/extras": "^1.0.0","axios": "^0.20.0","connect-history-api-fallback": "^1.6.0","core-js": "^3.6.5","express": "^4.17.1","quasar": "^1.0.0","serve-static": "^1.14.1","vue2-google-maps": "^0.10.7"
  },"devDependencies": {
    "@quasar/app": "^2.0.0","babel-eslint": "^10.0.1","eslint": "^6.8.0","eslint-config-prettier": "^6.9.0","eslint-loader": "^3.0.3","eslint-plugin-vue": "^6.1.2","workbox-webpack-plugin": "^5.1.4"
  },"browserslist": [
    "last 10 Chrome versions","last 10 Firefox versions","last 4 Edge versions","last 7 Safari versions","last 8 Android versions","last 8 ChromeAndroid versions","last 8 FirefoxAndroid versions","last 10 iOS versions","last 5 Opera versions"
  ],"engines": {
    "node": "~12.18.2","npm": "~6.14.5","yarn": ">= 1.21.1"
  }
}

这是heroku的日志

-----> Node.js app detected

       

-----> Creating runtime environment

       

       NPM_CONFIG_LOGLEVEL=error

       NODE_ENV=production

       NODE_MODULES_CACHE=true

       NODE_VERBOSE=false

       

-----> Installing binaries

       engines.node (package.json):  ~12.18.2

       engines.npm (package.json):   ~6.14.5

       engines.yarn (package.json):  >= 1.21.1

       

       Resolving node version ~12.18.2...

       Downloading and installing node 12.18.4...

       Bootstrapping npm ~6.14.5 (replacing 6.14.6)...

       npm ~6.14.5 installed

       Resolving yarn version >= 1.21.1...

       Downloading and installing yarn (1.22.5)

       Installed yarn 1.22.5

       

-----> Installing dependencies

       Installing node modules

       

       > core-js@3.6.5 postinstall /tmp/build_bc8b4d0e_/node_modules/core-js

       > node -e "try{require('./postinstall')}catch(e){}"

       

       

       > fsevents@1.2.13 install /tmp/build_bc8b4d0e_/node_modules/webpack-dev-server/node_modules/fsevents

       > node install.js

       

       

       Skipping 'fsevents' build as platform linux is not supported

       

       > ejs@2.7.4 postinstall /tmp/build_bc8b4d0e_/node_modules/ejs

       > node ./postinstall.js

       

       

       > fsevents@1.2.13 install /tmp/build_bc8b4d0e_/node_modules/watchpack-chokidar2/node_modules/fsevents

       > node install.js

       

       

       Skipping 'fsevents' build as platform linux is not supported

       

       > node-sass@4.14.1 install /tmp/build_bc8b4d0e_/node_modules/node-sass

       > node scripts/install.js

       

       Downloading binary from https://github.com/sass/node-sass/releases/download/v4.14.1/linux-x64-72_binding.node

       Download complete

       Binary saved to /tmp/build_bc8b4d0e_/node_modules/node-sass/vendor/linux-x64-72/binding.node

       Caching binary to /tmp/npmcache.XZGoT/_cacache/node-sass/4.14.1/linux-x64-72_binding.node

       

       > node-sass@4.14.1 postinstall /tmp/build_bc8b4d0e_/node_modules/node-sass

       > node scripts/build.js

       

       Binary found at /tmp/build_bc8b4d0e_/node_modules/node-sass/vendor/linux-x64-72/binding.node

       Testing binary

       Binary is fine

       

       > core-js@2.6.11 postinstall /tmp/build_bc8b4d0e_/node_modules/babel-runtime/node_modules/core-js

       > node -e "try{require('./postinstall')}catch(e){}"

       

       added 1590 packages in 23.801s

       

-----> Build

       Detected both "build" and "heroku-postbuild" scripts

       Running heroku-postbuild

       

       > portfolio@0.0.1 heroku-postbuild /tmp/build_bc8b4d0e_

       > yarn && yarn build

       

       yarn install v1.22.5

       info No lockfile found.

warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning,remove package-lock.json.

       [1/5] Validating package.json...

       [2/5] Resolving packages...

warning vue2-google-maps > babel-runtime > core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please,upgrade your dependencies to the actual version of core-js@3.

warning @quasar/app > webpack-dev-server > chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.

warning @quasar/app > webpack-dev-server > chokidar > fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.

warning @quasar/app > node-sass > request@2.88.2: request has been deprecated,see https://github.com/request/request/issues/3142

warning @quasar/app > node-sass > node-gyp > request@2.88.2: request has been deprecated,see https://github.com/request/request/issues/3142

warning @quasar/app > node-sass > request > har-validator@5.1.5: this library is no longer supported

warning @quasar/app > webpack > watchpack > watchpack-chokidar2 > chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.

warning @quasar/app > stylus > css-parse > css > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated

warning @quasar/app > webpack-dev-server > chokidar > braces > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated

warning @quasar/app > webpack-dev-server > chokidar > braces > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated

warning eslint-loader@3.0.4: This loader has been deprecated. Please use eslint-webpack-plugin

warning workbox-webpack-plugin > workbox-build > rollup-plugin-babel@4.4.0: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel.

warning workbox-webpack-plugin > workbox-build > @hapi/joi@15.1.1: joi is leaving the @hapi organization and moving back to 'joi' (https://github.com/sideway/joi/issues/2411)

warning workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/address@2.1.4: This version has been deprecated and is no longer supported or maintained

warning workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained

warning workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained

warning workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained

warning workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/topo > @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained

       [3/5] Fetching packages...

       info fsevents@2.1.3: The platform "linux" is incompatible with this module.

       info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.

       info fsevents@1.2.13: The platform "linux" is incompatible with this module.

       info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.

       [4/5] Linking dependencies...

warning " > eslint-loader@3.0.4" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".

warning " > workbox-webpack-plugin@5.1.4" has unmet peer dependency "webpack@^4.0.0".

       [5/5] Building fresh packages...

       success Saved lockfile.

       Done in 45.19s.

       yarn run v1.22.5

       $ quasar build

/bin/sh: 1: quasar: not found

error Command failed with exit code 127.

       info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

npm ERR! code ELIFECYCLE

npm ERR! syscall spawn

npm ERR! file sh

npm ERR! errno ENOENT

npm ERR! portfolio@0.0.1 heroku-postbuild: `yarn && yarn build`

npm ERR! spawn ENOENT

npm ERR! 

npm ERR! Failed at the portfolio@0.0.1 heroku-postbuild script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

npm ERR!     /tmp/npmcache.XZGoT/_logs/2020-09-28T01_01_55_709Z-debug.log

-----> Build failed

       

       We're sorry this build is failing! You can troubleshoot common issues here:

       https://devcenter.heroku.com/articles/troubleshooting-node-deploys

       

       If you're stuck,please submit a ticket so we can help:

       https://help.heroku.com/

       

       Love,Heroku

       

 !     Push rejected,failed to compile Node.js app.

 !     Push failed

解决方法

我遇到了和你一样的问题。我能够根据此链接中的建议修复它。我认为这是因为 @quasar/app 列在开发依赖项中。

https://devcenter.heroku.com/articles/nodejs-support#heroku-specific-build-steps

基本上,我更新了 package.json 的引擎部分以匹配我的本地环境

"engines": {
  "node": ">= 12.18.3","npm": ">= 6.14.11","yarn": ">= 1.22.5"
}

然后将heroku上的YARN_PRODUCTION env变量设置为false
heroku config:set YARN_PRODUCTION=false

我希望你会发现这很有用(P.S.当然不要在引擎部分设置静态值,而是使用通配符)

,

Quasar 可能没有在 heroku 上全局安装,

尝试使用 npx 运行它:

"scripts": {
 ...
 "build": "npx quasar build -m ssr","start": "cd dist/ssr; npm i; npm start"
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 &lt;select id=&quot;xxx&quot;&gt; SELECT di.id, di.name, di.work_type, di.updated... &lt;where&gt; &lt;if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 &lt;property name=&quot;dynamic.classpath&quot; value=&quot;tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-