2.8.1
https://play.nativescript.org/?template=play-vue&id=HdDm9M&v=400
Android 10 / NativeScript 7.0.11 /MacOS Mojave 10.14.6
vue init nativescript-vue/vue-cli-template
cd
npm install
tns run android or ios
watch error
Run the app
tns run android
Searching for devices...
Starting Android emulator with image Pixel_3_XL_API_29
Waiting for emulator device initialization...
Preparing project...
CLI for webpack must be installed.
webpack-cli (https://github.com/webpack/webpack-cli)
We will use "npm" to install the CLI via "npm install -D".
Do you want to install 'webpack-cli' (yes/no): yes
Installing 'webpack-cli' (running 'npm install -D webpack-cli')...
added 42 packages, and audited 1087 packages in 4s
51 packages are looking for funding
run npm fund for details
found 0 vulnerabilities
[webpack-cli] Unknown argument: --env.hmr
[webpack-cli] Unknown argument: --env.externals=~/package.json
[webpack-cli] Unknown argument: --env.externals=package.json
[webpack-cli] Unknown argument: --env.android
[webpack-cli] Unknown argument: --env.appPath=src
[webpack-cli] Unknown argument: --env.appResourcesPath=App_Resources
[webpack-cli] Unknown argument: --env.nativescriptLibPath=/usr/local/lib/node_modules/nativescript/lib/nativescript-cli-lib.js
[webpack-cli] Unknown argument: --env.sourceMap
Executing webpack failed with exit code 2.
I just created a fresh app and try to run the emulator and ran into this issue.
For some reason webpack-cli is not installing the correct version, you need to manually install it with
npm i --save-dev [email protected]
And then ns clean and ns run again.
(The error is from webpack 5, where they changed a lot of things - support for is in the progress, but in the meantime you need to stick to the older version)
Thanks, is working now.
We are locking this issue because it has been closed for more than 14 days.
If the issue comes up again please open a new issue with additional details.
Most helpful comment
For some reason
webpack-cliis not installing the correct version, you need to manually install it withAnd then
ns cleanandns runagain.(The error is from webpack 5, where they changed a lot of things - support for is in the progress, but in the meantime you need to stick to the older version)