Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

websocket-driver was not found on deploy

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'

Here is my 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?

I can't find this file "/tmp/build_545b56879454d397f9a53d8826eeeffb/yarn-error.log"

I did the following

   cd tmp

Nothing like build_

like image 913
johan Avatar asked Jun 22 '19 18:06

johan


2 Answers

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

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
like image 111
Chris Avatar answered Nov 15 '22 05:11

Chris


Best way for me:

  • delete package-lock.json
  • npm i
like image 25
Kurkov Igor Avatar answered Nov 15 '22 07:11

Kurkov Igor