NativeScript 版本 8.2.1:如何使用旧的过时插件
我是 NativeScript 和 Webpack 的新手,我已将本机脚本应用程序从 6.5.1 迁移到 8.2 版本,并且我正在使用 nativescript-orientation-free 插件,我收到构建错误,因为该插件仍然引用 Native 中不再支持的 tns-core-modules脚本 8 和我收到以下错误
8,我在 ./node_modules/nativescript-orientation-free/orientation.js 17:12-48 中 ERROR 找不到模块:错误:无法解析“/Users/admin/Development/project/node_modules/nativescript-orientation-free”中的“tns-core-modules/ui/enums”
错误。/node_modules/nativescript-orientation-免费/orientation.js 18:12-48 找不到模块:错误:无法解析“/Users/admin/Development/project/node_modules/nativescript-orientation-free”中的“tns-core-modules/ui/frame”,
我们不想使用此付费版本< a href="https://npm.proplugins.org/-/web/detail/@proplugins/nativescript-orientation" rel="nofollow noreferrer">pro-plugins-nativescript-orientation
您能让我知道如何解决此问题吗?我可以在 webpack.config.js 中做什么?我被困在这里了。
I am new to NativeScript and Webpack and i have migrated my native script app from 6.5.1 to 8.2 version, and i am using nativescript-orientation-free plugin ,i am getting build errors as this plugin still refers to tns-core-modules which is no longer supported in Native Script 8 and i am getting below errors
ERROR in ./node_modules/nativescript-orientation-free/orientation.js 17:12-48
Module not found: Error: Can't resolve 'tns-core-modules/ui/enums' in '/Users/admin/Development/project/node_modules/nativescript-orientation-free'
ERROR in ./node_modules/nativescript-orientation-free/orientation.js 18:12-48
Module not found: Error: Can't resolve 'tns-core-modules/ui/frame' in '/Users/admin/Development/project/node_modules/nativescript-orientation-free'
we do not want to use this paid version pro-plugins-nativescript-orientation
can you please let me know how can i fix this issue? is there anything i can do in the webpack.config.js ? I am stuck here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我对你表示同情。 (引用自电影《异形》。)
由于所有重大更改,将 NativeScript 应用程序从 6.5 迁移到 8.x 可能会非常令人沮丧。请务必观看此视频:将旧版 NativeScript 6 项目迁移到 8。
当迁移我的应用程序时,我发现我必须迁移我使用的几个插件。 Patch-package 是你的朋友!要回答您的问题,您需要修改圈出的链接。有时这很容易,有时这需要调查。
这三个应该可以工作:
我希望这两个应该可以工作,尽管我没有在我的项目中使用它们:
祝你好运!
You have my sympathies. (A quote from the movie Alien.)
Migrating a NativeScript app from 6.5 to 8.x can be wildly frustrating due to all the breaking changes. Make sure you watch this video: Migrating Legacy NativeScript 6 Project to 8.
When Migrating my app I found I had to migrate several of the plugins I used. Patch-package is your friend! To answer your question, you'll need to revise the links you circled. Sometimes this is easy, sometimes this requires investigation.
These three should work:
I expect these two should work, 'tho I didn't use them in my project:
Good luck!
我删除了这个插件,并且能够在没有任何第三方插件的情况下设置方向
i removed this plugin and able to set the orientation without any third party plugins using