Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
3 tasks done
SeanGriffin-Wellsky opened this issue Apr 10, 2024 · 3 comments · Fixed by #10520
Closed
3 tasks done
Labels

Comments

@SeanGriffin-Wellsky
Copy link

SeanGriffin-Wellsky commented Apr 10, 2024

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: nativescript-envinfo@1.0.9

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

@SeanGriffin-Wellsky SeanGriffin-Wellsky added the bug-pending-triage Reported bug, pending triage to confirm. label Apr 10, 2024
@fpaaske
Copy link

fpaaske commented Apr 15, 2024

Ran into this issue today. Locking version to 5.0.18 "solves" the problem.

@rigor789 rigor789 added bug and removed bug-pending-triage Reported bug, pending triage to confirm. labels Apr 15, 2024
@rigor789
Copy link
Member

This should be fixed in @nativescript/webpack@5.0.20 and up - you can revert the version range to ~5.0.0 to keep receiving webpack updates (we do try to keep them seamless and backwards compatible - this issue slipped through).

@SeanGriffin-Wellsky
Copy link
Author

I finally got around to validating this worked, and it did. Thank you for the quick turnaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants