Nuxt.js: Docker is no longer able to execute 'nuxt build' - Unable to update lock within the stale threshold

Created on 21 Mar 2019  路  1Comment  路  Source: nuxt/nuxt.js

Version

v2.5.0

Reproduction link

https://github.com/ibuchan72390/docker-nuxt-hmr

Steps to reproduce

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 .

What is expected ?

I would expect a lock can be gained on the targeted file and that we could successfully complete "nuxt build" within a docker container.

What is actually happening?

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.

Additional comments?

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:

This bug report is available on Nuxt community (#c8886)
bug-report

Most helpful comment

For workaround for now you can use --no-lock option

>All comments

For workaround for now you can use --no-lock option

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lazycrazy picture lazycrazy  路  3Comments

mikekidder picture mikekidder  路  3Comments

danieloprado picture danieloprado  路  3Comments

gary149 picture gary149  路  3Comments

shyamchandranmec picture shyamchandranmec  路  3Comments