Closed ldavidson closed 4 years ago
Hey @ldavidson , this is because you need to have the following in your typescript.json
:
https://github.com/PeterStaev/NativeScript-Drop-Down/blob/d345ab293a9fb24e3b62fd2f362d2c19addebcd4/demo-ng/tsconfig.json#L15-L19
I am aware that the {N} core team is depreciating those short import paths and are pushing all devs to write the full path which seems ridiculous as you have to type an additional 31 symbols for every import. You can read more details on the suggestions here: https://github.com/NativeScript/NativeScript/issues/4041#issuecomment-465477508
So for the time being I'm not going to take any actions on fixing this, until the core team decides how will they proceed with this. Will leave the issue open until then.
Thank you @PeterStaev, Yes that stinks especially for really long imports.
Hi @PeterStaev, just modifying tsconfig.json
should fix it? I think it only worked when I manually modified imports like @ldavidson did.
@carrbrpoa , yes, adding the paths in tsconfig.json
should fix the problem. I never had problems with any of my plugins (as all use short import paths 😄 ) even if the projects were upgraded to TNS 5.2. You might get warnings that short import paths are depreciated but the apps are working fine.
I'll open a PR to fix this. Short imports are deprecated
Hey @edusperoni , this is intentionally marked as wontfix
😉
I'm well aware that the {N} core team is depreciating those short import paths and are pushing all devs to write the full. But this seems ridiculous as you have to type an additional 31 symbols for every import. You can read more details on the discussion/suggestions here: https://github.com/NativeScript/NativeScript/issues/4041.
For all of my plugins I'm not going to fix the short imports until the core team implements a better solution for this. So I urge you to 👍 and comment on the above mentioned issue.
I absolutely agree with you on that front, and would rather use @nativescript/core
. The problem is that this plugin will need a workaround to work with new NativeScript releases. This is a discussion worth having, but I don't believe hindering the developer experience over 31 symbols is the correct approach to all this, so I'm asking you to reconsider.
This may be a stupid decision, but let's please not get into a battle of egos :)
I do not consider this hindering. The plugin works perfectly fine even with short imports.
I'm also facing the same issue
This is now fixed in the new version of the plugin available in the ProPlugins NPM registry. It uses the new scoped packages instead of the tns-core-modules
All future work of this plugin will be available exclusively as part of ProPlugins initiative. So if you want to get the latest updates/fixes/features make sure you subscribe to the service. You get all my plugins plus many of the most used and high quality plugins for a small monthly subscription fee.
I'd like to ask you to please reopen this as it's not fixed in the public repo. I should get around to opening a PR to fix this eventually.
Hey @edusperoni , I prefer to leave this closed, although it is not fixed on the public repo. This will give indication to users that if they want they can get the fix on ProPlugins.
Still feel free to submit a PR and I would gladly merge it in the public repo.
Merry Christmas!
Doesn't the private plugin have a private repo with its own issue tracker? This issue is still open on this repo and on this npm package.
Hindering this repo and treating as a second class citizen as an ad to ProPlugins doesn't seem very fair.
Merry Christmas to you too!
In my case TSConfig.json was like this and get error:
"baseUrl": "./src",
"paths": {
"*": [
"./node_modules/tns-core-modules/*",
"./node_modules/*"
],
I added one more dot before /node_modules
and all back to work:
"baseUrl": "./src",
"paths": {
"*": [
"../node_modules/tns-core-modules/*",
"../node_modules/*"
],
running "tns run android --bundle" getting errors and drop down is not showing: but seems to be fine in the playground.
I have worked around this by adding "tns-core-moduels/" in front of all requires in all files that are referencing tns-core-modules items. this includes: