NativeScript / NativeScript/nativescript-cli
App doesn't build after ns clean
未關閉
還沒有人認領這個 Issue。
needs more info
- 主要語言
- JavaScript
- 星號
- 1.1k
- 分支
- 204
- 平均合併
- 1 天 9 小時
- 30 天內合併 PR
- 8
描述
Environment
"dependencies": {
"@angular/animations": "~11.2.7",
"@angular/common": "~11.2.7",
"@angular/compiler": "~11.2.7",
"@angular/core": "~11.2.7",
"@angular/forms": "~11.2.7",
"@angular/platform-browser": "~11.2.7",
"@angular/platform-browser-dynamic": "~11.2.7",
"@angular/router": "~11.2.7",
"@nativescript/angular": "~11.8.0",
"@nativescript/core": "~8.0.0",
"@nativescript/theme": "~3.0.1",
"reflect-metadata": "~0.1.13",
"rxjs": "^6.6.7",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular/compiler-cli": "~11.2.7",
"@nativescript/android": "8.0.0",
"@nativescript/ios": "8.0.0",
"@nativescript/webpack": "5.0.0-beta.2",
"@ngtools/webpack": "~11.2.6",
"typescript": "~4.0.0"
}
Describe the bug
After cleaning the project with ns clean and starting the app again, webpack aborts with the message :
ns debug ios
Searching for devices...
Copying template files...
Platform ios successfully added. v8.0.0
Preparing project...
Compiling @angular/core : module as esm2015
Compiling @angular/animations : module as esm2015
Compiling @angular/animations/browser : module as esm2015
Compiling @angular/common : module as esm2015
Compiling @angular/platform-browser : module as esm2015
Compiling @angular/router : module as esm2015
Compiling @angular/forms : module as esm2015
Compiling @angular/platform-browser/animations : module as esm2015
Compiling @angular/common/http : module as esm2015
Compiling @nativescript/angular : module as esm2015
webpack is watching the files...
./foo/node_modules/@nativescript/webpack/node_modules/webpack/lib/NormalModuleFactory.js:703
throw new Error(
^
Error: NormalModuleFactory.beforeResolve (angular-compiler) is no longer a waterfall hook, but a bailing hook instead. Do not return the passed object, but modify it instead. Returning false will ignore the request and results in no module created.
at ./foo/node_modules/@nativescript/webpack/node_modules/webpack/lib/NormalModuleFactory.js:703:11
at eval (eval at create (./foo/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:14:1)
Executing webpack failed with exit code 1.
To Reproduce
- ns create foo --template @nativescript/template-blank-ng
- cd foo
- ns debug ios
- ctrl-c
- ns clean
- npm i
- ns debug ios
The same goes for Android
Expected behavior
The app starts as expected
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
在 iOS 或 Android 上,按照列出的 ns create、ns debug、ns clean 和 npm i 順序重現該失敗。閱讀回報行附近的 node_modules/@nativescript/webpack/node_modules/webpack/lib/NormalModuleFactory.js,並追蹤呼叫該 hook 的 angular-compiler 整合。完成標準是應用程式在兩個平台上執行 ns clean 後都能成功啟動。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- android, angular, ios, javascript, webpack
- 領域
- build-system, cli, mobile
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100