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

@quasar/app uses undeclared dependency "pretty-error" #8459

Closed
mesqueeb opened this issue Feb 12, 2021 · 9 comments
Closed

@quasar/app uses undeclared dependency "pretty-error" #8459

mesqueeb opened this issue Feb 12, 2021 · 9 comments

Comments

@mesqueeb
Copy link
Contributor

mesqueeb commented Feb 12, 2021

Error: @quasar/app tried to access pretty-error, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Required package: pretty-error (via "pretty-error")
Required by: @quasar/app@npm:2.1.14 (via /Users/lucaban/ghq/github.com/CyCraft/magnetar/.yarn/cache/@quasar-app-npm-2.1.14-3e6d9e2195-872dda9a1f.zip/node_modules/@quasar/app/lib/helpers/)

Require stack:
- /Users/lucaban/ghq/github.com/CyCraft/magnetar/.yarn/cache/@quasar-app-npm-2.1.14-3e6d9e2195-872dda9a1f.zip/node_modules/@quasar/app/lib/helpers/cli-error-handling.js
- /Users/lucaban/ghq/github.com/CyCraft/magnetar/.yarn/cache/@quasar-app-npm-2.1.14-3e6d9e2195-872dda9a1f.zip/node_modules/@quasar/app/bin/quasar
- /usr/local/lib/node_modules/@quasar/cli/bin/quasar
    at internalTools_makeError (/Users/lucaban/ghq/github.com/CyCraft/magnetar/.pnp.js:32317:34)
    at resolveToUnqualified (/Users/lucaban/ghq/github.com/CyCraft/magnetar/.pnp.js:33282:23)
@pdanpdan pdanpdan added the bug/0-needs-info Need more info to reproduce label Feb 12, 2021
@mesqueeb
Copy link
Contributor Author

@pdanpdan what info do you need

@mesqueeb
Copy link
Contributor Author

here it's being used:

const pe = require('pretty-error').start()

and here is the package.json that doesn't have the dependency:
https://github.com/quasarframework/quasar/blob/dev/app/package.json

@pdanpdan
Copy link
Collaborator

pdanpdan commented Feb 12, 2021

The version of app :) but now can be inferred from the branch.
Also the command used to get that error would have helped.
And os, npm/yarn, ... frequently matter.

@pdanpdan pdanpdan removed the bug/0-needs-info Need more info to reproduce label Feb 12, 2021
@mesqueeb
Copy link
Contributor Author

it's yarn with version codename berry, I believe it's beta of v2, but I'm not 100% sure.

@pdanpdan
Copy link
Collaborator

So you're using yarn2 with plug'n'play?
Then we would be very interested on how you made it to work, because:
#8245
#8286
#7581

@mesqueeb
Copy link
Contributor Author

mesqueeb commented Feb 12, 2021

I didn't!
I had too many problems so immediately s itched back haha.

But the fact that that package is not in the package.json I felt was worth reporting regardless.

@rstoenescu
Copy link
Member

This is a non-issue. The html-webpack-plugin already includes it. By now you would've noticed that if this was an issue it would've surfaced ages ago on any CLI errors being printed out :) For completeness though, I'll add it.

@merceyz
Copy link

merceyz commented Apr 16, 2021

The html-webpack-plugin already includes it

That's not how that works, if you're interested see https://yarnpkg.com/advanced/rulebook#packages-should-only-ever-require-what-they-formally-list-in-their-dependencies for details on dependency hoisting

@rstoenescu
Copy link
Member

This will become an obsolete thing anyway. Working on the Webpack 5 upgrade and I'm at the stage of redesigning how all errors and warnings are caught and displayed. This includes explicitly adding pretty-error as a direct dep of q/app.

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

4 participants