Error building Modern PWA

It looks like SAB thinks it successfully built the PWA for Selaru. But a careful look at the summary text has this line:

Moving PWA to preview folder…
C:\Users\xyz\AppData\Local\Temp\App Builder\preview\APPBUI~1\NODE_M~1\vite\NODE_M~1@esbuild\WIN32-~1\esbuild.exe - Access is denied.
A subdirectory or file C:\Users\xyz\AppData\Local\Temp\App Builder\preview already exists.
Access is denied.

Which than gives this error in the Preview Web Server window:
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\xyz\AppData\Local\Temp\App Builder\preview\appbuilder-pwa\package.json
npm ERR! errno -4058
npm ERR! enoent Could not read package.json: Error: ENOENT: no such file or directory, open ‘C:\Users\xyz\AppData\Local\Temp\App Builder\preview\appbuilder-pwa\package.json’
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in: C:\Users\xyz\AppData\Local\npm-cache_logs\2024-07-08T20_47_53_502Z-debug-0.log

C:\Users\xyz\AppData\Local\Temp\App Builder\preview\appbuilder-pwa>

Odd about the “Access Denied”. Any clues?

I wonder if the process is trying to delete a folder and isn’t able to. Have you manually deleted this folder and then tried doing it again?

Did you still have a terminal running a previous run of the PWA? If so, it still has the directory open and it can’t be deleted for the next run. Make sure to close the terminal started by “Run PWA” when done.

Chris

I suspect that was my problem, but the terminal window was hidden. Thanks.