-
Notifications
You must be signed in to change notification settings - Fork 4
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
nativescript-svg: Building Library results in "This dependency was not found" #8
Comments
Hi @dangrima90 |
Hi @SergeyMell, build process is done via Vue CLI (as we are working in a Vue based project) using the following command:
I think the issue is related to how we are building - from my tests even other libraries are failing. For example I tried importing using Workaround I found a workaround for the issue by ignoring the libraries I don't want to be included in the bundle via Webpack. In Vue CLI one can add extra Webpack configuration in the Example:
This workaround is working well so far - I still find it weird because in the code snippet I sent above all the code is doing is importing a function. |
Well, it seems that the problem happens because you're building the plugin, not in some specific iOS or Android environment. That's why the correspondent index..ts is not substituted by nativescript builder. Let me try to make some possible fix in a separate branch and I'll let you know once I'll publish it and you could give it a try. Glad that you've found a workaround because this will take me some time since right now I'm a bit busy (also with migrating the plugin to NS8) |
Thank you for your reply @SergeyMell, like you said I think the problem is related to how we are building the code. For now I have a workaround so it's fine really. Maybe in the future I'll see how we can change the build process to be more the "nativescript way". |
I'm currently working on a project where we're building our code into an npm package which we can then use internally across different projects. I've just added
nativescript-svg
plugin to allow us to have an icon component.We're using nativescript-vue - the plugin works well with vue as we are already using the plugin in other apps. However when trying to build we get the following error:
This dependency was not found .... To install it, you can run: npm install --save @sergeymell/nativescript-svg/index
.This is the code we have, all that's happening is that we have a wrapper component around the
SVGImage
and we're making use of thefromData
function.You will notice that the error I listed above states that the module to instal is
@sergeymell/nativescript-svg/index
. My suspicion is that this is happening because of the following setup:nativescript-plugins/packages/nativescript-svg/package.json
Line 5 in a0e6227
What I noticed is that the main file in the package.json is referencing
index
which doesn't seem to exist in the package that's being installed in the node_modules:Could this be related to the issue we're having?
The text was updated successfully, but these errors were encountered: