Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lerna run build errors with LOCK_FILES_CHANGED #4053

Open
Jacob212 opened this issue Jul 25, 2024 · 0 comments
Open

lerna run build errors with LOCK_FILES_CHANGED #4053

Jacob212 opened this issue Jul 25, 2024 · 0 comments

Comments

@Jacob212
Copy link

Current Behavior

When installing my mono-repo from fresh (or deleting package-json.lock and node_modules) it will fail to build first time but every other time it works fine.
Interestingly the build works fine running in my gitlab ci using image: node:18-alpine3.19
But will fail 100% of the time when ci is building my Dockerfile with FROM node:18-alpine3.19 AS dev

Expected Behavior

It should just build, currently I have to pin lerna to version 8.1.2 to allow my mono-repo to build.
I have tried versions 8.1.3 and the latest (8.1.7) which both fail to build.

Steps to Reproduce

I haven't been able to reproduce the error in the repro repo yet.
lerna/repro#14
But i will continue to add things and hopefully it will start happening

Failure Logs / Configuration

lerna.json

{
  "npmClient": "npm",
  "private": true,
  "version": "independent",
  "packages": ["my-packages*"],
  "registry": "https://my-npm.co.uk/",
  "command": {
    "publish": {
      "verifyAccess": false,
      "ignoreChanges": ["*.md", "tests/*", "ignored-files"]
    }
  },
  "$schema": "node_modules/lerna/schemas/lerna-schema.json"
}

nx.json

{
  "targetDefaults": {
    "build": {
      "cache": true,
      "dependsOn": ["^build"],
      "outputs": ["{projectRoot}/lib"]
    }
  }
}

lerna-debug.log

0 silly argv {
0 silly argv   _: [ 'run' ],
0 silly argv   lernaVersion: '8.1.3',
0 silly argv   '$0': 'node_modules/.bin/lerna',
0 silly argv   script: 'build'
0 silly argv }
1 notice cli v8.1.3
2 verbose packageConfigs Explicit "packages" configuration found in lerna.json. Resolving packages using the configured glob(s): ["my-packages*"]
3 verbose rootPath /path/to/mono-repo
4 error Error: LOCK_FILES_CHANGED
4 error     at handleMessage (/path/to/mono-repo/node_modules/nx/src/daemon/server/server.js:78:88)
4 error     at /path/to/mono-repo/node_modules/nx/src/daemon/server/server.js:59:15
4 error     at Socket.<anonymous> (/path/to/mono-repo/node_modules/nx/src/utils/consume-messages-from-socket.js:13:17)
4 error     at Socket.emit (node:events:514:28)
4 error     at addChunk (node:internal/streams/readable:343:12)
4 error     at readableAddChunk (node:internal/streams/readable:316:9)
4 error     at Readable.push (node:internal/streams/readable:253:10)

Environment

lerna notice cli v8.1.3
lerna info versioning independent

 Environment info:

  System:
    OS: Linux 5.15 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
    CPU: (6) x64 Intel(R) Core(TM) i5-9500 CPU @ 3.00GHz
  Binaries:
    Node: 18.20.3 - ~/.nvm/versions/node/v18.20.3/bin/node
    Yarn: 1.22.22 - ~/.nvm/versions/node/v18.20.3/bin/yarn
    npm: 10.7.0 - ~/.nvm/versions/node/v18.20.3/bin/npm
  Utilities:
    Git: 2.45.2 - /usr/bin/git
  npmPackages:
    lerna: 8.1.3 => 8.1.3 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant