greenkeeperio / greenkeeper-lockfile

:lock: Your lockfile, up to date, all the time
https://greenkeeper.io
183 stars 73 forks source link

greenkeeper-lockfile-update errors with missing directory in node_modules #194

Open wolfy1339 opened 6 years ago

wolfy1339 commented 6 years ago
$ node --version
v10.8.0
$ npm --version
6.2.0
$ nvm --version
0.33.11

Running on TravisCI using stable nodejs release. greenkeeper-lockfile-update (using v2, and set the GK_LOCK_DEFAULT_BRANCH="v4" env variable) reports that the branch is not a greenkeeper branch, but it is reporting it wrong, since Greenkeeper was opening PRs just fine before this on that branch. I just added a package-lock.json to my repo

travi commented 6 years ago

have you checked both builds for the PR? one is identified as master because it merges with master. the other is the only one that will be detected as the greenkeeper branch.

wolfy1339 commented 6 years ago

Okay, so that was that. Now it is still not working. Here's the output: https://travis-ci.org/wolfy1339/m8tro-bootstrap/builds/414477822#L549

janl commented 6 years ago

That’s a really weird one, it looks like package.json and node_modules/ don’t agree with each other.

wolfy1339 commented 6 years ago

I have tried deleting the cache, nothing works. This has happened on a greenkeeper PR now. It is the same error as before

SuperITMan commented 6 years ago

I have the same error with node 8.

$ node --version
v8.11.4
$ npm --version
5.6.0
$ nvm --version
0.33.11
$ greenkeeper-lockfile --version
2.4.0

Here's the output: https://travis-ci.org/NationalBankBelgium/stark/jobs/422057979

And here you can find the error:

/home/travis/.nvm/versions/node/v8.11.4/lib/node_modules/greenkeeper-lockfile/update.js:64
    process.chdir(lockfilePath)
            ^
Error: ENOENT: no such file or directory, uv_chdir
    at allPackageFiles.reduce (/home/travis/.nvm/versions/node/v8.11.4/lib/node_modules/greenkeeper-lockfile/update.js:64:13)
    at Array.reduce (<anonymous>)
    at Module.update [as exports] (/home/travis/.nvm/versions/node/v8.11.4/lib/node_modules/greenkeeper-lockfile/update.js:61:36)
    at Object.<anonymous> (/home/travis/.nvm/versions/node/v8.11.4/lib/node_modules/greenkeeper-lockfile/update.js:110:37)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
The command "greenkeeper-lockfile-update" failed and exited with 1 during .

Would you have any idea how to solve this ? 😊

Thanks for the help

jameswilddev commented 6 years ago

Able to repro: https://travis-ci.org/jameswilddev/vnhtml/jobs/423094262

wolfy1339 commented 6 years ago

@janl @travi Is there anything we could do to help you guys out move this along?

travi commented 6 years ago

sorry @wolfy1339, i'm not actually part of the greenkeeper team. i only mentioned what i did above to attempt to help clarify what seems to be a common confusion point with travis (note that multiple branch confusion is not a problem with greenkeeper).

janl commented 6 years ago

Quick heads-up for those who only have public dependencies, you can now stop using greenkeeper-lockfile: https://blog.greenkeeper.io/announcing-native-lockfile-support-85381a37a0d0

We’ve put all our energy behind that, and now we have time to look into this issue again. Thanks for all your patience!

janl commented 6 years ago

https://github.com/greenkeeperio/greenkeeper-lockfile/releases/tag/v2.7.1 should stop failing the build, and print the path that seems to go away for no reason :)