-
Notifications
You must be signed in to change notification settings - Fork 46
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 import Dropzone.svelte from a local package with npm link
#151
Comments
Same issue here, thx for PR |
The error was reported two weeks ago, no one integrates the PR? My app can no longer be created using CI because the build command fails .... |
Same here - the new version v2.0.3 is unfortunately useless for us, because our build-system cannot use a PR. |
I have created a small workaround by downloading and editing the Package.Json locally. Then I added the corrected JSON file to my project and during the CI pipeline before I call "npm build" I replace the broken one against my manually corrected version. This is quite risky, but at least you can get on without a fork.
|
Needed to go back from |
Hi all! Sorry, there was an accidental breaking change in 2.0.2 via pr #150 (per the comments above I think you need to pin to 2.0.1, not 2.0.2). That said, the fix is to stop doing import Dropzone from "svelte-file-dropzone/Dropzone.svelte"; and instead do import Dropzone from "svelte-file-dropzone"; |
Please update documentation - README on GH and NPM |
Ah! Good point |
2.0.4 is out with the readme updated to reflect the new import path |
Thanks
PR #150 was merged in commit 8395738, and released in v2.0.2 (https://github.com/thecodejack/svelte-file-dropzone/releases/tag/v2.0.2) |
I am getting setup to work on the Dropzone component on my local workstation, as a dependency in my app. So I think the right way to do that is to clone it locally and to use npm link, so that's what I'm doing:
npm install
npm run package
npm link
npm link svelte-file-dropzone
npm install
npm run build
In my own app I am importing it like this:
The build fails like this:
I tried changing the import to all of the following and none of them worked:
I think the fix is to include
./Dropzone.svelte
in the package.jsonexports
config, which I read about in the svelte packaging guide :Although I have no idea why this fix is actually needed, I will open a PR in case you want to see the fix.
The text was updated successfully, but these errors were encountered: