部署时未找到websocket-driver [英] websocket-driver was not found on deploy

查看:258
本文介绍了部署时未找到websocket-driver的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Heroku上更新我的Rails 5.2.1应用程序,但出现此错误.

I am trying to update my Rails 5.2.1 app on Heroku and I've got this error.

remote: -----> Installing dependencies
remote:        Installing node modules (yarn.lock)
remote:        yarn install v1.17.2
remote:        [1/4] Resolving packages...
remote:        [2/4] Fetching packages...
remote:        error An unexpected error occurred: "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.2.tgz: Request failed \"404 Not Found\"".
remote:        info If you think this is a bug, please open a bug report with the information provided in "/tmp/build_053b37334aad96876abbe953fb52fde5/yarn-error.log".
remote:        info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
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 myapp-production.
remote:
To https://git.heroku.com/lapenderie-production.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/myapp-production.git'

这是我的package.json:

{
  "name": "kamelot",
  "private": true,
  "dependencies": {
    "@rails/webpacker": "3.5",
    "babel-preset-react": "^6.24.1",
    "flatpickr": "^4.5.7",
    "highcharts": "^7.1.1",
    "prop-types": "^15.7.2",
    "react": "^16.8.6",
    "react-color": "^2.17.3",
    "react-dom": "^16.8.6",
    "react_ujs": "^2.5.0",
    "webpack-cli": "^3.3.4"
  },
  "devDependencies": {
    "webpack-dev-server": "2.11.2"
  }
}

我尝试添加节点版本,但这不能解决问题.

I tried adding the node version but that didn't resolve the issue.

这曾经起作用.我该如何解决?

This used to work. How can I fix it?

我找不到此文件"/tmp/build_545b56879454d397f9a53d8826eeeffb/yarn-error.log"

我做了以下

   cd tmp

没有像build_

推荐答案

由于某种原因版本0.7. websocket-driver中的2个没有在NPM上发布,尽管它确实存在于GitHub上.

For some reason version 0.7.2 of websocket-driver is not published on NPM, though it does exist on GitHub.

我建议您升级到0.7.3(或阅读本文时的最新版本)并重新部署:

I suggest you upgrade to 0.7.3 (or whatever the latest version is when you read this) and redeploy:

yarn upgrade websocket-driver
git add yarn.lock
git commit -m 'Update dependencies'
git push heroku master

这篇关于部署时未找到websocket-driver的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆