Describe the bug
The serve command fails due to syntax errors in nuxt.config.js file. This occurs due to redundant module injection happening while configuring PWA dependencies. A simple check to see if the project is already configured for PWA before installing the dependencies and modifying the nuxt.config.js can solve this problem.
To Reproduce
Run the following commands are ran on a Ubuntu 20.04 system.
$ mevn init test-app
> Nuxt-js
# Yes for all with PWA support
$ cd test-app
$ mevn serve
> client
The initial run will be successful, however subsequent runs will fail. with the following error.
$ mevn serve
> client
FATAL Invalid or unexpected token
'@nuxtjs/eslint-module',
^
SyntaxError: Invalid or unexpected token
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1159:10
Expected behavior
All the subsequent run of the serve command should execute without fail. The launch script should not append the modules if the app is already configured once for PWA, with necessary modules in nuxt.config.js.
Additional context
Setting a simple flag in the .mevnrc after configuring PWA for the initial time will be helpful to check and prevent re-configuring the app for PWA for subsequent runs.
Describe the bug The
serve
command fails due to syntax errors innuxt.config.js
file. This occurs due to redundant module injection happening while configuring PWA dependencies. A simple check to see if the project is already configured for PWA before installing the dependencies and modifying thenuxt.config.js
can solve this problem.To Reproduce Run the following commands are ran on a Ubuntu 20.04 system.
The initial run will be successful, however subsequent runs will fail. with the following error.
Expected behavior All the subsequent run of the serve command should execute without fail. The launch script should not append the modules if the app is already configured once for PWA, with necessary modules in
nuxt.config.js
.Screenshots
Environment Info
Additional context Setting a simple flag in the
.mevnrc
after configuring PWA for the initial time will be helpful to check and prevent re-configuring the app for PWA for subsequent runs.