https://github.com/ibuchan72390/docker-nuxt-hmr
Attached is a simple nuxt repo I had originally used to demonstrate HMR viability in a nuxt dev instance housed in a docker container. After updating Nuxt to 2.5.0, I'm no longer able to properly build out this container.
Navigate into the node folder and execute the following from the CLI:
docker build -f test.dockerfile .
I would expect a lock can be gained on the targeted file and that we could successfully complete "nuxt build" within a docker container.
Nuxt is failing to get a proper lock on the required files and it ends up failing the build entirely. As such, I'm no longer able to build a production mode docker container for a nuxt application.
NPM Err:
/usr/app/node_modules/proper-lockfile/lib/lockfile.js:198
onCompromised: (err) => { throw err; },
^
Error: Unable to update lock within the stale threshold
at options.fs.stat (/usr/app/node_modules/proper-lockfile/lib/lockfile.js:121:25)
at /usr/app/node_modules/graceful-fs/polyfills.js:285:20
at FSReqWrap.oncomplete (fs.js:159:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: nuxt build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-03-21T19_31_23_334Z-debug.log
The command '/bin/sh -c npm run build' returned a non-zero code:
For workaround for now you can use --no-lock option
Most helpful comment
For workaround for now you can use --no-lock option