jdx / npm-register

Your own private npm registry and backup server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

heroku build fails because of "Outdated Yarn lockfile"

maplesteve opened this issue · comments

Either the yarn.lock has to be updated or the yarn option --frozen-lockfile has to be left out.

-----> Node.js app detected
-----> Creating runtime environment
       
       NPM_CONFIG_LOGLEVEL=error
       NODE_VERBOSE=false
       NODE_ENV=production
       NODE_MODULES_CACHE=true
-----> Installing binaries
       engines.node (package.json):  ^8.4.0
       engines.npm (package.json):   unspecified (use default)
       engines.yarn (package.json):  unspecified (use default)
       
       Resolving node version ^8.4.0...
       Downloading and installing node 8.11.3...
       Using default npm version: 5.6.0
       Resolving yarn version 1.x...
       Downloading and installing yarn (1.9.4)...
       Installed yarn 1.9.4
-----> Restoring cache
       Skipping cache restore (not-found)
-----> Building dependencies
       Installing node modules (yarn.lock)
       yarn install v1.9.4
       [1/4] Resolving packages...
       error Your lockfile needs to be updated, but yarn was run with `--frozen-lockfile`.
       info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
-----> Build failed
 !     Outdated Yarn lockfile
       Your application contains a Yarn lockfile (yarn.lock) which does not
       match the dependencies in package.json. This can happen if you use npm
       to install or update a dependency instead of Yarn.
       Please run the following command in your application directory and check
       in the new yarn.lock file:
       $ yarn install
       $ git add yarn.lock
       $ git commit -m "Updated Yarn lockfile"
       $ git push heroku master
    
       https://kb.heroku.com/why-is-my-node-js-build-failing-because-of-an-outdated-yarn-lockfile
 !     Push rejected, failed to compile Node.js app.
 !     Push failed

Can you try deleting your node_modules and yarn.lock then reinstalling?

I didn't do this local - I just hit the "heroku Deploy" button from the Readme, entered the required info and clicked "Deploy app". During the build on heroku the above error was shown.

Gotcha, I think I know what needs to happen. Reviewing.