Skip to content
This repository was archived by the owner on Sep 9, 2024. It is now read-only.
This repository was archived by the owner on Sep 9, 2024. It is now read-only.

node gyp error after adding lz4 as dependency #123

Description

@anfern777

Steps to reproduce

  • Create an empty project with the following package.json:
{
  "name": "lz4issue",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "description": "",
  "dependencies": {
    "lz4": "^0.6.5",
    "nestjs-asyncapi": "^1.3.0"
  }
}
  • Run npm install

Output:

...
npm error code 7
npm error path pathxyz/node_modules/lz4
npm error command failed
npm error command sh -c node-gyp rebuild
npm error gyp info it worked if it ends with ok
npm error gyp info using node-gyp@7.1.2
npm error gyp info using node@20.16.0 | darwin | arm64
npm error gyp info find Python using Python version 3.12.4 found at "/opt/homebrew/opt/python@3.12/bin/python3.12"
npm error gyp ERR! UNCAUGHT EXCEPTION 
npm error gyp ERR! stack TypeError: Cannot assign to read only property 'cflags' of object '#<Object>'
npm error gyp ERR! stack     at createConfigFile (pathxyz/Desktop/PackageIssues/node_modules/node-gyp/lib/configure.js:117:21)
npm error gyp ERR! stack     at pathxyzDesktop/PackageIssues/node_modules/node-gyp/lib/configure.js:84:9
npm error gyp ERR! stack     at FSReqCallback.oncomplete (node:fs:187:23)
npm error gyp ERR! System Darwin 23.4.0
npm error gyp ERR! command "pathxyz/.nvm/versions/node/v20.16.0/bin/node" "pathxyz/Desktop/PackageIssues/node_modules/.bin/node-gyp" "rebuild"
npm error gyp ERR! cwd pathxyz/Desktop/PackageIssues/node_modules/lz4
npm error gyp ERR! node -v v20.16.0
npm error gyp ERR! node-gyp -v v7.1.2
npm error gyp ERR! Node-gyp failed to build your package.
npm error gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the package author.
npm error A complete log of this run can be found in: pathxyz/.npm/_logs/2024-08-09T08_32_54_734Z-debug-0.log

System properties:
MacOs. Sonoma 14.4.1
Chip: Apple M1
node version: v20.16.0
npm version: 10.8.2
python version: 3.12

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions