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

Failed to find module: "querystring", relative to: app/tns_modules/ #158

Open
andresilva-cc opened this issue Apr 12, 2021 · 3 comments
Open

Comments

@andresilva-cc
Copy link

Make sure to check the demo app(s) for sample usage

Make sure to check the existing issues in this repository

If the demo apps cannot help and there is no issue for your problem, tell us about it

After migrating the project to NativeScript 8.0, the following error is generated when trying to run the app on Android:
System.err: Error: com.tns.NativeScriptException: Failed to find module: "querystring", relative to: app/tns_modules/

Which platform(s) does your issue occur on?

  • Tested only on Android
  • Android 11
  • Emulator

Please, provide the following version numbers that your issue occurs with:

  • CLI: 8.0.1
  • Cross-platform modules: @nativescript/core: 8.0.1
  • Runtime(s): @nativescript/android: 8.0.0
  • Plugin(s): (look for the version numbers in the package.json file of your
    project and paste your dependencies and devDependencies here)
  "dependencies": {
    "@nativescript-community/ui-chart": "~1.1.24",
    "@nativescript/camera": "~5.0.8",
    "@nativescript/core": "~8.0.0",
    "@nativescript/datetimepicker": "~2.1.0",
    "@nativescript/firebase": "~11.1.3",
    "@nativescript/localize": "~5.0.4",
    "@nstudio/nativescript-loading-indicator": "~4.0.0",
    "axios": "~0.21.1",
    "moment": "~2.29.1",
    "moment-range": "~4.0.2",
    "nativescript-oauth2": "~3.0.3",
    "nativescript-photoviewer": "~2.1.5",
    "nativescript-socketio": "~3.3.1",
    "nativescript-toasty": "~3.0.0-alpha.2",
    "nativescript-ui-chart": "~8.0.2",
    "nativescript-ui-dataform": "~7.0.4",
    "nativescript-videoplayer": "~5.0.1",
    "nativescript-vue": "~2.9.0",
    "vuex": "~3.5.1"
  },
  "devDependencies": {
    "@nativescript/android": "8.0.0",
    "@nativescript/ios": "8.0.0",
    "@nativescript/webpack": "~5.0.0-beta.0",
    "eslint": "~6.8.0",
    "eslint-config-airbnb-base": "~14.1.0",
    "eslint-plugin-import": "~2.21.1",
    "eslint-plugin-vue": "~6.2.2",
    "nativescript-vue-template-compiler": "~2.8.1",
    "nativescript-worker-loader": "~0.12.1",
    "sass": "~1.26.10"
  }

Please, tell us how to recreate the issue in as much detail as possible.

  1. Install nativescript-oauth2
  2. Implement it
  3. Try to run with ns run android

Is there any code involved?

Unfortunately it is a customer project and I can't share any code

@BBazard
Copy link

BBazard commented Apr 13, 2021

I had the same problem.
I solved it by downgrading @nativescript/webpack.
Here is my line in package.json:
"@nativescript/webpack": "^4.1.0",

@andresilva-cc
Copy link
Author

I had the same problem.
I solved it by downgrading @nativescript/webpack.
Here is my line in package.json:
"@nativescript/webpack": "^4.1.0",

Downgrading throw the following error:

TypeError: webpack.init is not a function

Not sure if that's because I'm using NativeScript 8.

@BBazard
Copy link

BBazard commented Apr 14, 2021

I don't remember having this error.
Did you revert the webpack.config.js to the one you had before upgrading to Nativescript 8?

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

No branches or pull requests

2 participants