-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
[Angular] Plugin works fine in workspace, Module not found in published package #6
Comments
Same issue for me (I'm on macOS) |
Actually, I have two packages in my collection https://github.com/SergeyMell/nativescript-plugins and one of them (nativescript-svg) is imported correctly to the external projects and the other one (color-wheel) works only inside the workspace demo. Tries to import it to some external project lead to the same issue as mentioned above. |
I’m going to take a look at that repo this weekend to see what I can tell. |
I setup a sample repo to consume external to plugin workspace referenced above from @SergeyMell and see the behavior as described. I'm investigating to see what may be the contributing factor in this workspace and hope to have answer by Monday. |
I managed to understand what is the source of the issue. If the plugin name does not start with However, I failed to find the place where this logic is declared so I want to ask @NathanWalker if this can be considered like a bug or it is some naming conventions that we should stick to? |
It doesn’t affect several other plugin workspaces we manage. Trying to determine what’s different about yours and qlip’s. |
Actually, I've stripped the compiled versions of both For sure I'll investigate more and either find some problems with qlip’s plugin or some proofs of such logic instide NativeScript bundling process |
@BlueHunter99 based on @SergeyMell 's investigations this PR will get you going: Nothing in tooling factors into that so could be a ng-packagr thing so we'll continue investigating but feel free to continue on this basis. It is something we do recommend with your own personal scoping to make clear those are {N} plugins under your scope and should help you manage your scope better as you can end up having other tech stack related plugins in that scope with clear identification. Closing this for now and we'll do some other investigations outside of this regarding ng-packagr specifically. |
@NathanWalker & @SergeyMell thank you both for the investigation. Will use the PR you provided. |
I know this got closed but just in case it helps down the road, I was seeing the same issue and workaround that @BlueHunter99 saw. The only difference is that I was able to get a package name to work without a "nativescript-" prefix. Here's what I tried:
Just thought it was interesting that the "@hn-ns" scope I used didn't require a package name starting with "nativescript-" |
I have the same issue, even if I change the plugin name so that it includes
Any idea? |
Issue
When building and running the plugin using the provided tools everything works. But after publishing (manually because I am on Windows) and using the plugin in another project I get the following error:
Code
The troublesome code is this:
If there is any way to change this import to make the plugin work that is preferred.
Reproduction
Workspace setup
npm start
to build the checkbox plugin and run the angular demoProject setup
ns create
a new project with angular and the Hello World template, or use this demo repons plugin add @qlip/checkbox
app.module.ts
usingimport { NativeScriptCheckboxModule } from "@qlip/checkbox/angular";
and add it to theimports
array.The text was updated successfully, but these errors were encountered: