pwa-module: Nuxt build stuck at 95% with @nuxtjs/pwa enabled
https://cmty.app not posting messages so I managed to paste the issue template here ๐
Version
Reproduction link
http://see-additional-comments.dev
Steps to reproduce
- On macbook: install @nuxtjs/pwa with yarn
- add @nuxtjs/pwa in nuxt.config.js modules
- run
yarn devornuxt - build script hangs at 95%
What is expected ?
Build script should finish
What is actually happening?
Build script is stuck at
โ โ
โ Nuxt.js v2.8.1 โ
โ Running in development mode (universal) โ
โ โ
โ Listening on: http://localhost:3000/ โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โน Preparing project for development 09:19:13
โน Initial build may take a while 09:19:13
โ Builder initialized 09:19:13
โบ App root: /Users/hugo/dev/some-app 09:19:13
โบ Generating nuxt files 09:19:13
โบ Generating routes... 09:19:13
โ Nuxt files generated 09:19:13
โบ Creating webpack middleware... 09:19:17
โ Client โโโโโโโโโโโโโโโโโโโโโโโโโ emitting (95%) nuxt-pwa-icon
โ Server
Compiled successfully in 17.68s
If I try nuxt build, I got a little more verbose error message:
nuxt build
โน Production build 09:23:03
plugin:nuxt-rfg-icon Retrieving favicons from realfavicongenerator api +0ms
plugin:nuxt-rfg-icon Finished adding favicons as assets +11s
โ Builder initialized 09:23:14
โ Nuxt files generated 09:23:14
โ Client โโโโโโโโโโโโโโโโโโโโโโโโโ emitting (95%) nuxt-pwa-icon
โฏ Server
ERROR (node:65879) DeprecationWarning: Tapable.plugin is deprecated. Use new API on .hooks instead 09:23:18
FATAL ENOENT: no such file or directory, open '/Users/hugo/dev/some-app/node_modules/@nuxtjs/icon/.cache/a71aaa/64.png' 09:23:48
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ โ Nuxt Fatal Error โ
โ โ
โ Error: ENOENT: no such file or directory, open '/Users/hugo/dev/some-app/node_modules/@nuxtjs/icon/.cache/a71aaa/64.png' โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Additional comments?
Iโm really sorry I canโt provide a repro link, but this bug is only happening on my macbook (on linux/server env everything runs nice). I updated XCode additional components to latest version then nuxt stopped building. Could it be related?
I tried:
- removing
node_moduleswhole folder & re-installing withyarn - removing
.nuxtfolder - rebooting my computer (who knows?)
Edit : I tried with pwa-icon setup without icon :
['@nuxtjs/pwa', {icon: false }],
And it works. Really weirdโฆ
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 19
- Comments: 22 (4 by maintainers)
Hi @manniL
Nice catch: I tried removing
nuxt-rfg-icon. It was still stuck. Then I removed mynode_modulesfolder, ranyarnagain. Andnuxtworked. ๐ฒSo I added
nuxt-rfg-iconback again and everything seems to work as normal.Thanks for pointing it out. Iโll come back if something break again (I hope not)
Cheers ๐ป
I have the same problem on my production vps, but on development enviroment all works fine.
If it helps, the most recent version that will compile for me is @nuxtjs/pwa@3.0.0-beta.14
Should be fixed by 3.1.0 (thanks to @1ed โค๏ธ )
@pi0 Ok I think I figured this out - when generating the icons, the icon module attempts to start the node inspector. Since I was running with the --inspector flag in development mode, the inspector had already been started and thus the build fails when attempting to add the icons to the proper hash directory within the .cache directory.
Adding to the confusion, when you attempt to recreate the error, the cache directory for the hash has already been created. Since the icon module only checks to see if the directory exists when creating the icons, it assumes that the icons have already been created when they actually havenโt.
Iโm not sure where the node inspector is started within the pwa-icon module, my my suggested fixes would be:
Iโm having the same issue on 3.0.0-beta.20
Likewise, setting icon to false allows the compilation to complete.
Once I rolled back to 2.4.0 it worked even with the icon enabled
Iโm having this same problem with the latest Nuxt and deleting
node_modulesand reinstalling did not work for me, nor did wrappingsetIntervalfunctions inif (process.client). Adding{ icon: false }to the module configuration for@nuxt/pwainnuxt.config.jsworked, but donโt I want my PWA to have an icon?