NativeScript / NativeScript/angular

NativeScript 8.2 upgrade failed, throws build errors and npm installs fail

未关闭
#64 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
TypeScript
星标
55
派生
13
平均合并
16 分钟
30 天内合并 PR
1

描述

Environment
✔ Component nativescript has 8.2.3 version and is up to date.
✔ Component @nativescript/core has 8.2.1 version and is up to date.
✔ Component @nativescript/ios has 8.2.3 version and is up to date.
✔ Component @nativescript/android has 8.2.2 version and is up to date.

  • iOS Runtime: 15.4
  • NativeScript-Angular: 13.0.0
  • Angular: 13.2.0

Describe the bug
After following this guide to upgrade to NativeScript 8.2.0 from 8.1.5, now when I run "npm install" it gives these warnings:

MacBook-Pro:UI justintoth$ npm install
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@eslint/eslintrc@1.2.1',
npm WARN EBADENGINE   required: { node: '^12.22.0 || ^14.17.0 || >=16.0.0' },
npm WARN EBADENGINE   current: { node: 'v14.16.0', npm: '8.3.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@typescript-eslint/eslint-plugin@5.17.0',
npm WARN EBADENGINE   required: { node: '^12.22.0 || ^14.17.0 || >=16.0.0' },
npm WARN EBADENGINE   current: { node: 'v14.16.0', npm: '8.3.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE ...

Worse, when trying to build it throws errors about "fs":

Module not found: Error: Can't resolve 'fs' in '/Users/justintoth/Dev/housters/UI/node_modules/source-map/lib'
 @ ./node_modules/source-map/lib/source-map-consumer.js 17:17-44
 @ ./node_modules/source-map/source-map.js 7:0-82
 @ ./node_modules/stacktrace-gps/stacktrace-gps.js
 @ ./node_modules/stacktrace-js/stacktrace.js
 @ ./node_modules/@nativescript/firebase-crashlytics/index.ios.js 14:0-39 73:12-32
 @ ./src/app/shared/services/analytics.service.ts 4:0-44
 @ ./src/app/components/public/signin/signin.component.ts 9:0-78 13:0-65 126:116-135 177:37-53
 @ ./src/app/app.module.ts 15:0-73
 @ ./src/main.ts 4:0-45 6:69-78

ERROR in ./node_modules/source-map/lib/read-wasm.js 21:15-30
Module not found: Error: Can't resolve 'path' in '/Users/justintoth/Dev/housters/UI/node_modules/source-map/lib'...

Here is the full build log: https://gist.github.com/justintoth/d8fde7b79e45df5f2f3310cf56d04edd

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先,使用报告中的 NativeScript、Angular、Node 和 npm 版本重现 npm install 和 NativeScript 构建。跟踪从 src/app/shared/services/analytics.service.ts 经过 @nativescript/firebase-crashlytics 的导入链,并检查链接的完整构建日志以查找依赖项失败。报告的项目能够安装和构建,且不再出现所示的模块解析错误,即视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, typescript
领域
build-system, mobile
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
28/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。