Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Upgrading to @nativescript/webpack-5.0.19 requires upgrade to @nativescript/core-8.7.0 #10511

Closed
@SeanGriffin-Wellsky

Description

@SeanGriffin-Wellsky

Issue Description

I'm currently using @nativescript/webpack 5.0.18 with @nativescript/core 8.3.6 (yes, I know that's old). Everything builds fine. However, when I upgrade @nativescript/webpack to 5.0.19 my Android build breaks.

The issue seems to trace to this PR, specifically this line.

I would not have expected to have to do a significant upgrade of @nativescript/core (a runtime dep) to take a patch version of @nativescript/webpack (a devDep), so I logged this as a bug, but maybe it's just how it is. Still, I'd expect @nativescript/webpack to at least get a minor version bump in this scenario rather than what's supposed to be a safe "patch".

Reproduction

  1. Use @nativescript/webpack 5.0.19 w/ a version of @nativescript/core prior to 8.7.0.
  2. Execute ns build android

Relevant log output (if applicable)

ERROR in tns_modules/inspector_modules
Module not found: Error: Can't resolve '@nativescript/core/inspector_modules' in '...'
resolve '@nativescript/core/inspector_modules' in '...'
  Parsed request is a module
  using description file: .../package.json (relative path: .)
    resolve as module
      looking for modules in .../node_modules
        existing directory .../node_modules/@nativescript/core
          using description file: .../node_modules/@nativescript/core/package.json (relative path: .)
            using description file: .../node_modules/@nativescript/core/package.json (relative path: ./inspector_modules)
              no extension
                .../node_modules/@nativescript/core/inspector_modules doesn't exist
              .android.ts
                .../node_modules/@nativescript/core/inspector_modules.android.ts doesn't exist
              .ts
                .../node_modules/@nativescript/core/inspector_modules.ts doesn't exist
              .android.js
                .../node_modules/@nativescript/core/inspector_modules.android.js doesn't exist
              .js
                .../node_modules/@nativescript/core/inspector_modules.js doesn't exist
              .android.mjs
                .../node_modules/@nativescript/core/inspector_modules.android.mjs doesn't exist
              .mjs
                .../node_modules/@nativescript/core/inspector_modules.mjs doesn't exist
              .android.css
                .../node_modules/@nativescript/core/inspector_modules.android.css doesn't exist
              .css
                .../node_modules/@nativescript/core/inspector_modules.css doesn't exist
              .android.scss
                .../node_modules/@nativescript/core/inspector_modules.android.scss doesn't exist
              .scss
                .../node_modules/@nativescript/core/inspector_modules.scss doesn't exist
              .android.json
                .../node_modules/@nativescript/core/inspector_modules.android.json doesn't exist
              .json
                .../node_modules/@nativescript/core/inspector_modules.json doesn't exist
              as directory
                .../node_modules/@nativescript/core/inspector_modules doesn't exist


ls node_modules/@nativescript/core/inspector_modules*
----------------
node_modules/@nativescript/core/inspector_modules.ios.d.ts
node_modules/@nativescript/core/inspector_modules.ios.js
node_modules/@nativescript/core/inspector_modules.ios.js.map

Environment

npm WARN exec The following package was not found and will be installed: [email protected]

OS: macOS 14.4.1
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Shell: /bin/zsh
node: 18.19.0
npm: 10.2.3
nativescript: 8.7.0

# android
java: 17.0.9
ndk: Not Found
apis: 33
build_tools: 33.0.2
system_images: Not Found

# ios
xcode: 15.3/15E204a
cocoapods: 1.15.2
python: Not Found
python3: 3.11.7
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": {
  "@angular/animations": "~12.0.0",
  "@angular/common": "~12.0.0",
  "@angular/compiler": "~12.0.0",
  "@angular/core": "~12.0.0",
  "@angular/forms": "~12.0.0",
  "@angular/platform-browser": "~12.0.0",
  "@angular/platform-browser-dynamic": "~12.0.0",
  "@angular/router": "~12.0.0",
  "@nativescript-community/drawingpad": "~4.1.0",
  "@nativescript-community/ui-material-activityindicator": "~7.2.0",
  "@nativescript-community/ui-material-button": "~7.2.0",
  "@nativescript-community/ui-material-tabs": "~7.2.0",
  "@nativescript-community/ui-material-textfield": "~7.2.0",
  "@nativescript/angular": "~12.0.0",
  "@nativescript/core": "~8.3.5",
  "@nativescript/datetimepicker": "~2.1.9",
  "@nativescript/directions": "~2.0.1",
  "@nativescript/geolocation": "~8.3.0",
  "@nativescript/theme": "~3.0.1",
  "@nativescript/unit-test-runner": "~2.0.5",
  "@ngrx/effects": "~12.5.0",
  "@ngrx/store": "~12.5.0",
  "@nstudio/nativescript-audio-recorder": "~0.1.0",
  "@nstudio/nativescript-checkbox": "~2.0.4",
  "material-design-icons": "~3.0.1",
  "moment": "~2.29.3",
  "nativescript-audio": "~6.2.6",
  "nativescript-fonticon": "~2.0.2",
  "nativescript-modal-datetimepicker": "~2.1.5",
  "nativescript-ng2-fonticon": "~1.3.4",
  "nativescript-phone": "~3.0.2",
  "nativescript-speech-recognition": "~2.0.0",
  "nativescript-ui-listview": "~10.0.2",
  "nativescript-ui-sidedrawer": "~10.0.1",
  "rxjs": "~6.6.0",
  "zone.js": "~0.11.4"
},
"devDependencies": {
  "@angular/compiler-cli": "~12.0.0",
  "@nativescript/android": "~8.2.2",
  "@nativescript/ios": "~8.3.3",
  "@nativescript/types": "~8.2.0",
  "@nativescript/webpack": "~5.0.6",
  "@ngtools/webpack": "~12.0.0",
  "@types/jasmine": "~3.7.2",
  "karma": "~6.3.17",
  "karma-jasmine": "~4.0.1",
  "karma-nativescript-launcher": "~0.4.0",
  "karma-webpack": "~5.0.0",
  "sass": "~1.49.9",
  "sass-loader": "~12.6.0",
  "typescript": "~4.2.0"
}

Please accept these terms

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions