-
-
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
Cannot resolve dependency 'vscode' #3034
Comments
VSCode specifies no Running I'm guessing VSCode somehow injects the real module during runtime? |
Changing the target to node worked! Thanks a ton, I'll mark this as closed. Hopefully people bundling VSCode extensions in the future can run across this. One note, the flag is |
Great!
parcel/packages/core/parcel-bundler/src/cli.js Lines 54 to 58 in 4b50182
|
I am having a similar problem. Changing the target to node leads to a successful build since it's no longer bundling dependencies, but I have other dependencies besides vscode that I do need bundled. Still trying to figure out a solution if anyone runs across something. |
have the same issue as @Abyrd9 , any solution for that ? |
Having same issue as @Abyrd9 , trying to migrate to Parcel2 to see if it can fix the issue... |
Could this issue be reopened since excluding all node modules is not really a fix? I also ran into this problem and couldn't circumvent it by using includeNodeModules: { "vscode": false }. |
so what do you do if you are bundling a vscode extension (target=node) but need dependencies (except vscode) in the bundle |
With Parcel 2, you can do something like this in package.json to bundle everything except
https://v2.parceljs.org/configuration/package-json/#includenodemodules |
Hi @mischnic https://github.com/sketchbuch/vsc-packages/tree/feature/parcel2 If I run the build command, it builds but doesn't include the dependencies. Is my package.json correct? My targets object seems to be ignored |
Ignore my last comment, In addition to parcel 2 I also still had parcel 1 in my package.json and that was being used it seems. also needed to upgrade node to 12.18.3 to fix #5245 |
🐛 bug report
Parcel fails on
import * as code from 'vscode';
. It also fails if I import directly, i.e.import { ExtensionContext } from 'vscode';
🎛 Configuration (.babelrc, package.json, cli command)
Package.json
tsconfig.json
🤔 Expected Behavior
Parcel should bundle the VSCode extension
😯 Current Behavior
💁 Possible Solution
Unsure
🔦 Context
I'm currently trying to bundle a VSCode extension.
💻 Code Sample
🌍 Your Environment
The text was updated successfully, but these errors were encountered: