NativeScript / NativeScript/nativescript-cli
Global variables not defined in CLI 8.8
未关闭
还没有人认领这个 Issue。
question
- 主要语言
- JavaScript
- 星标
- 1.1k
- 派生
- 204
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 8
描述
Issue Description
After bumping packages, I found that some packages/plugins only work when I uninstall ns cli globally and install "nativescript": "8.7.2" (downgrade from cli 8.8).
Reproduction
https://github.com/asharghi/print-star-demo
- Clone and run with 'ns run iOS' with CLI 8.8
- Tap on "Test" button and see "Error" in the console log. ReferenceError: MTPrinterStar is not defined
- Uninstall CLI 8.8 and install CLI 8.7.2
- Run 'ns clean && ns run ios'
- Tap on "Test" button again and see "Success" in the console log
Relevant log output (if applicable)
No response
Environment
OS: macOS 14.6.1
CPU: (10) arm64 Apple M1 Max
Shell: /bin/zsh
node: 18.18.1
npm: 9.8.1
nativescript: Not Found
# android
java: 17.0.11
ndk: Not Found
apis: Not Found
build_tools: Not Found
system_images: Not Found
# ios
xcode: 15.3/15E204a
cocoapods: 1.15.2
python: 2.7.18
python3: 3.12.4
ruby: 2.7.8
platforms:
- DriverKit 23.4
- iOS 17.4
- macOS 14.4
- tvOS 17.4
- visionOS 1.1
- watchOS 10.4
Dependencies
"dependencies": {
"@nativescript-community/perms": "^2.3.3",
"@nativescript/core": "~8.8.0",
"@nativescript/theme": "^3.1.0",
"nativescript": "8.7.2",
"nativescript-permissions": "^1.3.12",
"nativescript-print-star": "file:local_modules/nativescript-print-star-latest.tgz",
"nativescript-vue": "~2.9.3"
},
"devDependencies": {
"@nativescript/ios": "8.8.1",
"@nativescript/types": "~8.8.0",
"@nativescript/webpack": "~5.0.0",
"@types/node": "~17.0.21",
"nativescript-vue-template-compiler": "~2.9.3",
"typescript": "~5.4.0",
"vue": "~2.6.12"
}
Please accept these terms
- I have searched the existing issues as well as StackOverflow and this has not been posted before
- This is a bug report
- I agree to follow this project's Code of Conduct
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从链接的 print-star 演示开始,使用 CLI 8.8 复现 iOS 运行,然后将其与 CLI 8.7.2 进行比较。调查在 NativeScript iOS 插件流程中全局变量 MTPrinterStar 何时变为可用;当演示在 CLI 8.8 下记录 Success 且无需降级时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- cli, mobile-dev
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 30/100