-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Diagnostic for undeclared external dependencies does not respect includeNodeModules #6588
Comments
Interesting. The diagnostic was intended to catch issues just like this though, e.g. you're publishing a library and want something to be an external. Generally when someone consumes that code it will break unless you have a dependency declared. I think in this case Parcel simply doesn't have enough information to know that I think this would be a problem for other environments as well, like electron. We currently handle builtins by default for node, but for other environments we don't. Maybe it should be some kind of alias configuration? Aliasing a module to {
"alias": {
"atom": { "builtin": "atom" }
}
} |
I think adding an {
"envDependencies": {
"atom": "^1.55",
"electron": "^6.0.0"
}
} |
There's a similar situation with |
What about using the |
Yes, that works. |
I believe #6603 is not enough. For instances:
What can I do to fix this without dropping these dependencies ? |
{
"pnpm": {
"packageExtensions": {
"electron-is-dev": {
"engines": {
"electron": "*"
}
},
"electron-unhandled": {
"engines": {
"electron": "*"
}
}
}
}
}
|
We do also have an electron environment in parcel, so we should probably mark the electron module as a builtin anyway. |
🐛 bug report
#6564 breaks Parcel for Atom.
atom
is a built-in dependency that is not declared inside dependencies. It is implied because all the code runs inside the Atom environment.Previously, we could specify such dependencies in
includeNodeModules
and set it tofalse
, but this PR seems to disable that capability🎛 Configuration (.babelrc, package.json, cli command)
Here is the target:
🤔 Expected Behavior
The parcel should not care about the dependencies that are set as
false
inincludeNodeModules
😯 Current Behavior
It errors.
💁 Possible Solution
Downgrade Parcel
🔦 Context
💻 Code Sample
https://github.com/atom-community/terminal
🌍 Your Environment
The text was updated successfully, but these errors were encountered: