Nativescript-vue: Unknown argument: --env.hmr

Created on 24 Nov 2020  路  3Comments  路  Source: nativescript-vue/nativescript-vue

Version

2.8.1

Reproduction link

https://play.nativescript.org/?template=play-vue&id=HdDm9M&v=400

Platform and OS info

Android 10 / NativeScript 7.0.11 /MacOS Mojave 10.14.6

Steps to reproduce

vue init nativescript-vue/vue-cli-template
cd
npm install
tns run android or ios
watch error

What is expected?

Run the app

What is actually happening?

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.

normal

Most helpful comment

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)

All 3 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

HunterJS-bit picture HunterJS-bit  路  3Comments

rigor789 picture rigor789  路  6Comments

vhristov5555 picture vhristov5555  路  4Comments

fvdung picture fvdung  路  3Comments

Fabiyo-90 picture Fabiyo-90  路  6Comments