Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error Couldn't find a package.json (or bower.json)... (installing chimp) #1864

Closed
pmoleri opened this issue Nov 15, 2016 · 8 comments
Closed

Comments

@pmoleri
Copy link

pmoleri commented Nov 15, 2016

Reporting a bug.

Couldn't find a package.json error when adding xolvio/chimp (github) dependency.
Steps:

$ yarn init
$ yarn cache clean
$ rm yarn.lock
$ yarn add "xolvio/chimp"
yarn add v0.16.1
...
[3/4] Linking dependencies...
error Couldn't find a package.json (or bower.json) file in C:\Work\repos\test\node_modules\chimp\node_modules\cucumber
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

node.js: v6.9.1
yarn: v0.16.1 (same with 0.17.0)
OS: Windows 10 / bash

This issue seems related to: #1215 and #1058.
yarn cache clean doesn't solve the issue.
If cache is clean and chimp is installed from npm (instead of github) it works fine. If after doing this, yarn.lock is removed then `yarn add "xolvio/chimp" works fine.

@billyvg
Copy link
Contributor

billyvg commented Nov 15, 2016

I'm facing similar issue, not sure if they are related, following the steps above I get this error ONLY with 0.17.x - it seems to be fine with 0.16.1

❯ yarn add chimp
yarn add v0.17.0
info No lockfile found.
[1/4] 🔍  Resolving packages...
warning chimp > mocha > glob > minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning chimp > request > tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
warning chimp > mocha > to-iso-string@0.0.2: to-iso-string has been deprecated, use @segment/to-iso-string instead.
warning chimp > mocha > jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning Unmet peer dependency "chai@>= 2.1.2 < 4".
error An unexpected error occurred: "ENOENT: no such file or directory, lstat '/Users/billy/Library/Caches/Yarn/npm-cucumber-1.3.0-55eee8073fb576a98b83df0e082e42b860d91d9f'".
info If you think this is a bug, please open a bug report with the information provided in "/Users/billy/Development/chimptest/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Here is 0.17.2 when adding xolvio/chimp

❯ yarn add xolvio/chimp
yarn add v0.17.2
info No lockfile found.
[1/4] 🔍  Resolving packages...
warning chimp > mocha > glob > minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning chimp > request > tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
warning chimp > mocha > to-iso-string@0.0.2: to-iso-string has been deprecated, use @segment/to-iso-string instead.
warning chimp > mocha > jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
warning chimp > chromedriver > npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
error An unexpected error occurred: "ENOENT: no such file or directory, lstat '/Users/billy/Library/Caches/Yarn/npm-chimp-0.41.2-522cc1f3094c5e95ed8ca229a505863bc5842050'".
info If you think this is a bug, please open a bug report with the information provided in "/Users/billy/Development/chimptest/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

@pmoleri
Copy link
Author

pmoleri commented Nov 16, 2016

I skipped 0.17.0 because of another bug.
With 0.17.2 (after a cache clean) I get the exact same error as @billyvg.
I tried Windows 10 with bash and cmd with the same result.

@springmeyer
Copy link

Also hitting this with:

$ yarn add tap@0.1.4
yarn add v0.17.6
info No lockfile found.
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
error Couldn't find a package.json file in "/Users/dane/foo/node_modules/tap/node_modules/tap-consumer"
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

@pmoleri
Copy link
Author

pmoleri commented Nov 24, 2016

Tested the same as springmeyer with v0.17.8

C:\repos\test>yarn add tap@0.1.4
yarn add v0.17.8
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
error Couldn't find a package.json file in "C:\\repos\\test\\node_modules\\tap\\node_modules\\tap-consumer"
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

@pmoleri
Copy link
Author

pmoleri commented Dec 20, 2016

This is still happening for both "xolvio/chimp" and tap@0.1.4.

@wclr
Copy link
Contributor

wclr commented Jan 5, 2017

Was it investigated at least?

@TrustNik
Copy link

Looks like related #886

@BYK
Copy link
Member

BYK commented Sep 15, 2017

Works on master now.

@BYK BYK closed this as completed Sep 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants