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

Add acorn dependency to fix npm warning #666

Merged
merged 2 commits into from
Jan 4, 2019
Merged

Conversation

joelanman
Copy link
Contributor

@joelanman joelanman commented Jan 3, 2019

It seems there is a problem with npm installing 'peer dependencies'
npm's warning says that we need to install this dependency ourselves.

We are getting this issue via eslint, via standard

The bug is tracked here:
eslint/eslint#11018

It seems there is a problem with npm installing 'peer dependencies'
npm's warning says that we need to install this dependency ourselves.
The bug is tracked here:
eslint/eslint#11018
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-prototype-kit-pr-666 January 3, 2019 19:02 Inactive
@NickColley
Copy link
Contributor

NickColley commented Jan 4, 2019

Not sure this is the best way to solve this issue since we're not using this dependency at the top level in this project.

Do we know that the warnings are causing issues for our users?

@joelanman
Copy link
Contributor Author

yeh people are always worried about the warnings in training and asking if something went wrong.

more importantly, this is a necessary dependency that isn't being installed. This is npm's own recommendation for how to fix that. They are apparently working on a fix themselves for npm 6

@joelanman
Copy link
Contributor Author

I don't really see a downside to this - I think the worst that can happen is in the future standard/eslint doesn't need acorn any more, and we have an extraneous package for a while until we remove it.

@NickColley
Copy link
Contributor

I think it would be better to figure out which dependency uses acorn and acorn-jsx and try and fix this issue upstream?

@joelanman
Copy link
Contributor Author

the bug is in npm

Copy link
Contributor

@NickColley NickColley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't aware that this was an issue that came up in training, that's good to know.

Found this response from the npm team that suggests this problem wont be solved soon: eslint/eslint#10022 (comment)

necessary dependency that isn't being installed

I'd recommend we raise an issue to track removing this dependency in the future since we don't actually need this dependency to run standard (we don't lint JSX).

@joelanman
Copy link
Contributor Author

related to #660

@joelanman joelanman temporarily deployed to govuk-prototype-kit-pr-666 January 4, 2019 10:49 Inactive
@joelanman joelanman merged commit 02e7a72 into master Jan 4, 2019
@joelanman joelanman deleted the fix-acorn-warning branch January 4, 2019 11:09
lfdebrux added a commit that referenced this pull request Dec 14, 2022
In PR #667 we added `acorn` as a direct dependency to fix complaints
from npm about peer dependencies, due to a bug in npm [[1]]. That bug
now appears to have been fixed; removing `acorn` from our `package.json`
does not result in any peer dependency warnings. Also, as we now ensure
that users do not install dev dependencies, we can be confident that
they will not need `acorn`, as it is only required by dev dependencies.

[1]: #666
lfdebrux added a commit that referenced this pull request Dec 14, 2022
In PR #667 we added `acorn` as a direct dependency to fix complaints
from npm about peer dependencies, due to a bug in npm [[1]]. That bug
now appears to have been fixed; removing `acorn` from our `package.json`
does not result in any peer dependency warnings. Also, as we now ensure
that users do not install dev dependencies, we can be confident that
they will not need `acorn`, as it is only required by dev dependencies.

[1]: #666
lfdebrux added a commit to alphagov/govuk-prototype-kit-docs that referenced this pull request Dec 21, 2022
In commit e6ed4ff we added `acorn` as a direct dependency to fix complaints
from npm about peer dependencies, due to a bug in npm [[1]]. That bug
now appears to have been fixed; removing `acorn` from our `package.json`
does not result in any peer dependency warnings.

[1]: alphagov/govuk-prototype-kit#666
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

Successfully merging this pull request may close these issues.

3 participants