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

npm3 script, use deprecated version of estraverse #296

Closed
adriengibrat opened this issue Oct 18, 2015 · 7 comments

Comments

@adriengibrat
Copy link

commented Oct 18, 2015

I'm having ExportDefaultDeclaration error with npm3 using standard v5.3.1 in npm script ... but no error when using it in cli!

This bug is resolved.

But with npm3, when using standard via a npm script, a deprecated version of estraverse (see RReverser/estraverse-fb#5) is used.

It's related on how npm3 resolves dependencies. I did not checked the dependency tree to check if there is peer dependencies...

It's not a bug in standard, but I created an issue here to avoid anyone to spend too much time to track this down.

@feross

This comment has been minimized.

Copy link
Member

commented Oct 18, 2015

It sounds like you have two copies of standard installed. One global (used by the CLI) and one local (used by npm run scripts). You can update both to the latest version by running:

npm install standard -g
npm install standard@latest --save-dev

@feross feross closed this Oct 18, 2015

@dcousens

This comment has been minimized.

Copy link
Member

commented Oct 18, 2015

@feross is @latest not required for -g?

@feross

This comment has been minimized.

Copy link
Member

commented Oct 18, 2015

npm install -g always uses the latest version from npm. The reason you need @latest for local install is that there could be an old version specified in package.json and npm install will obey the semver restrictions.

@dcousens

This comment has been minimized.

Copy link
Member

commented Oct 18, 2015

TIL, thanks :)

@feross

This comment has been minimized.

Copy link
Member

commented Oct 18, 2015

https://docs.npmjs.com/cli/install is really interesting, fwiw 👍

@adriengibrat

This comment has been minimized.

Copy link
Author

commented Oct 19, 2015

Yep, I have both global and local standard installed. But both are v5.3.1, so it's not just a version pb.

The pb is when local standard is called via npm script, it use the deprecated version of estraverse because of estraverse-fb deprecated dependency.

The bug seems to be related to npm3 dependencies collision handling: npm/npm#9708

I worked around the pb, doing this: npm/npm#9708 (comment)

@feross feross reopened this Oct 19, 2015

@feross

This comment has been minimized.

Copy link
Member

commented Feb 4, 2016

Closing this now, since it's not a standard issue.

@feross feross closed this Feb 4, 2016

@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
3 participants
You can’t perform that action at this time.