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

"yarn add newrelic" fails with "Couldn't find a package.json" error #1215

Closed
jordaaash opened this issue Oct 18, 2016 · 8 comments
Closed

"yarn add newrelic" fails with "Couldn't find a package.json" error #1215

jordaaash opened this issue Oct 18, 2016 · 8 comments

Comments

@jordaaash
Copy link

jordaaash commented Oct 18, 2016

Do you want to request a feature or report a bug?

bug

What is the current behavior?

yarn add newrelic fails with

error Couldn't find a package.json (or bower.json) file in /Users/jordan/yarn-bug/node_modules/newrelic/node_modules/concat-stream

I suspect it's a problem with bundledDependencies in the newrelic package.

If the current behavior is a bug, please provide the steps to reproduce.

➜  yarn init
yarn init v0.15.1
question name (yarn-bug):
question version (1.0.0):
question description:
question entry point (index.js):
question git repository:
question author:
question license (MIT):
success Saved package.json
✨  Done in 8.81s.
➜  yarn
yarn install v0.15.1
info No lockfile found.
success Nothing to install.
✨  Done in 0.33s.
➜  yarn add newrelic
yarn add v0.15.1
info No lockfile found.
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
error Couldn't find a package.json (or bower.json) file in /Users/jordan/yarn-bug/node_modules/newrelic/node_modules/concat-stream
    at /usr/local/lib/node_modules/yarn/lib/config.js:355:13
    at next (native)
    at step (/usr/local/lib/node_modules/yarn/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
    at /usr/local/lib/node_modules/yarn/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:20
    at run (/usr/local/lib/node_modules/yarn/node_modules/core-js/library/modules/es6.promise.js:87:22)
    at /usr/local/lib/node_modules/yarn/node_modules/core-js/library/modules/es6.promise.js:100:28
    at flush (/usr/local/lib/node_modules/yarn/node_modules/core-js/library/modules/_microtask.js:18:9)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
info Visit http://yarnpkg.com/en/docs/cli/add for documentation about this command.

What is the expected behavior?

➜  npm install --save newrelic
#snip
- concat-stream@1.5.2 node_modules/concat-stream
#snip
yarn-bug@1.0.0 /Users/jordan/Stylisted/yarn-bug
└─┬ newrelic@1.31.0
  ├─┬ concat-stream@1.5.2
#snip

Please mention your node.js, yarn and operating system version.

➜  node -v
v6.2.0
➜  yarn -V
0.15.1
@jordaaash
Copy link
Author

Confirmed that this still fails with yarn 0.16.0

@alexlafroscia
Copy link

Just tried to reproduce myself, but couldn't:

$ mkdir foo
$ cd foo
$ yarn init
blah blah blah
$ yarn add newrelic
yarn add v0.16.0
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 20 new dependencies.
├─ agent-base@1.0.2
├─ concat-stream@1.5.2
│  ├─ isarray@1.0.0
│  └─ readable-stream@2.0.6
├─ core-util-is@1.0.2
├─ debug@2.2.0
├─ extend@3.0.0
├─ https-proxy-agent@0.3.6
├─ inherits@2.0.3
├─ isarray@0.0.1
├─ json-stringify-safe@5.0.1
├─ ms@0.7.1
├─ newrelic@1.31.0
├─ process-nextick-args@1.0.7
├─ readable-stream@1.1.14
├─ semver@4.3.6
├─ string_decoder@0.10.31
├─ typedarray@0.0.6
├─ util-deprecate@1.0.2
└─ yakaa@1.0.1
Done in 5.89s.

Node version 4.5.0, yarn version 0.16.0

@jordaaash
Copy link
Author

I'm on Node 6.2.0, maybe that's the issue?

On Oct 18, 2016 9:30 PM, "Alex LaFroscia" notifications@github.com wrote:

Just tried to reproduce myself, but couldn't:

$ mkdir foo
$ cd foo
$ yarn init
blah blah blah
$ yarn add newrelic
yarn add v0.16.0
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 20 new dependencies.
├─ agent-base@1.0.2
├─ concat-stream@1.5.2
│ ├─ isarray@1.0.0
│ └─ readable-stream@2.0.6
├─ core-util-is@1.0.2
├─ debug@2.2.0
├─ extend@3.0.0
├─ https-proxy-agent@0.3.6
├─ inherits@2.0.3
├─ isarray@0.0.1
├─ json-stringify-safe@5.0.1
├─ ms@0.7.1
├─ newrelic@1.31.0
├─ process-nextick-args@1.0.7
├─ readable-stream@1.1.14
├─ semver@4.3.6
├─ string_decoder@0.10.31
├─ typedarray@0.0.6
├─ util-deprecate@1.0.2
└─ yakaa@1.0.1
Done in 5.89s.

Node version 4.5.0, yarn version 0.16.0


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#1215 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABHmqQQyici197gJA70xeLD22IA1NlLzks5q1YC7gaJpZM4KaYCO
.

@samccone
Copy link
Member

This is no longer reproducible on master. Closing, let me know if this is still an issue for you.

@alanhogan
Copy link

alanhogan commented Oct 29, 2016

I just ran into this problem, but with ember-cli. Specifically, a quite old version that a particular project is stuck on, 1.13.8, I think. Or rather, my fork: "git+ssh://git@github.com/alanhogan/ember-cli.git#patch-1"

The error I’m getting is:

error Couldn't find a package.json (or bower.json) file in /path/to/my-project/node_modules/ember-cli/node_modules/bower

This is on yarn install v0.16.1, node 6.9.1 (although the project is actually using node 0.12 for, uh, reasons.)

@simoami
Copy link

simoami commented Feb 25, 2017

still happening with yarn 0.18.1, node 6.10.0

@OllieEdge
Copy link

OllieEdge commented Aug 7, 2017

Have this with yarn 0.27.5 node 7.2.0, happens with yarn add restify-session

@BYK
Copy link
Member

BYK commented Aug 7, 2017

Fixed on master via #4046, please try the nightlies.

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

7 participants