NS 7 with Angular application entry point not being found
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- angular, javascript, typescript
- 领域
- build-system, cli, mobile-dev
调研方向
先从 tsconfig.tns.json 附近的迁移行为以及 nativescript.config.ts 中的入口点设置入手,然后检查 webpack.config.tns.js,并依次执行 ns migrate 和 ns run android 进行复现。完成的标准是:迁移后的 Angular code-sharing 项目能够编译并运行,且不会出现无效 HTML 或缺少应用程序入口点的错误。
由索引模型根据 Issue 内容生成。
描述
Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
✔ Your ANDROID_HOME environment variable is set and points to correct directory.
✔ Your adb from the Android SDK is correctly installed.
✔ The Android SDK is installed.
✔ A compatible Android SDK for compilation is found.
✔ Javac is installed and is configured properly.
✔ The Java Development Kit (JDK) is installed and is configured properly.
✔ Xcode is installed and is configured properly.
✔ xcodeproj is installed and is configured properly.
✔ CocoaPods are installed.
✔ CocoaPods update is not required.
✔ CocoaPods are configured properly.
✔ Your current CocoaPods version is newer than 1.0.0.
✔ Python installed and configured correctly.
✔ The Python 'six' package is found.
✔ Xcode version 11.6.0 satisfies minimum required version 10.
✔ Getting NativeScript components versions information...
⚠ Update available for component nativescript. Your current version is 7.0.7-2020-09-09-185920-14263 and the latest available version is 7.0.7.
✔ Component @nativescript/core has 7.0.2 version and is up to date.
✖ Component @nativescript/ios is not installed.
✔ Component @nativescript/android has 7.0.0 version and is up to date.
Describe the bug
After upgrading a code sharing project with Angular to version 7 (using ns migrate) produces a project that results in the following errors being thrown when ns run android is run.
- Web project only HTML files are being flagged as invalid. (It seems these files are being included regardless).
Application entry point file not founderror, even with"main": "main.js"is defined inpackage.jsonornativescript.config.ts
I noticed that during migration, the old tsconfig.tns.json is removed. Without this the project doesn't even start up and notes that a tsconfig file cannot be found. Adding back in my original tsconfig.tns.json file allows the compilation process to start but then throws up the aforementioned errors.
My tsconfig.tns.json
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"module": "esNext",
"target": "es2015",
"moduleResolution": "node",
"skipLibCheck": true,
"resolveJsonModule": true,
"paths": {
// Paths removed for clarity
}
},
"files": ["apps/my-app/src/main.tns.ts"]
}
My nativescript.config.ts
// Identifiable names changed / removed
import { NativeScriptConfig } from '@nativescript/core';
export default {
id: 'com.company.my-app',
appResourcesPath: 'apps/my-app/App_Resources',
android: {
v8Flags: '--expose_gc --harmony_destructuring',
markingMode: 'none',
},
appPath: 'apps/my-app/src',
main: 'main.js',
nsext: '.tns',
webext: '',
shared: true,
useLegacyWorkflow: false,
webpackConfigPath: './webpack.config.tns.js',
} as NativeScriptConfig;
It is worth noting that this project is included within a @nrwl/nx workspace and was working perfectly prior to the upgrade process.
- 主要语言
- JavaScript
- 星标
- 1.1k
- 派生
- 204
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 8
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NativeScript/nativescript-cli 的其他 Issue
-
in-progress
NativeScript/nativescript-cli#6140 · 2 条评论 · 已指派 1 人 ·
-
NativeScript/nativescript-cli#6090 · 已指派 1 人 ·
-
in progress
NativeScript/nativescript-cli#6015 · 1 个 reaction · 已指派 1 人 ·
-
question
难度 4/5 3-5 天 新手友好度 48/100
NativeScript/nativescript-cli#5992 · 5 条评论 ·
-
feature-pending-triage
难度 4/5 3-5 天 新手友好度 35/100
NativeScript/nativescript-cli#5975 ·
查看 NativeScript/nativescript-cli 的全部 Issue
相似的 Issue
-
Edit: CW+ 未关闭channels:edit check:passed
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 78/100
idean3885/claude-ops-agent#521 ·
-
forespørsel 🥰 ikoner 🖼 nytt ✨
难度 2/5 1-3 小时 新手友好度 68/100
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
avniproject/avni-client#2135 ·
-
automated broken-link
难度 1/5 1 小时以内 新手友好度 85/100