NativeScript / NativeScript/angular

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

Open
#64 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
55
Forks
13
Avg merge
16m
Merged PRs (30d)
1

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing npm install and the NativeScript build with the reported NativeScript, Angular, Node, and npm versions. Trace the import chain from src/app/shared/services/analytics.service.ts through @nativescript/firebase-crashlytics and inspect the linked full build log for the dependency failure. Done means the reported project installs and builds without the shown module-resolution errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
build-system, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.