Closed p3x-robot closed 1 year ago
my bad, sorry.
i am getting this error, which only working, if i update node-gyp:
npm ERR! gyp verb command install [ '20.4.0' ]
npm ERR! gyp verb install input version string "20.4.0"
npm ERR! gyp verb install installing version: 20.4.0
npm ERR! gyp verb install --ensure was passed, so won't reinstall if already installed
npm ERR! gyp verb install version is already installed, need to check "installVersion"
npm ERR! gyp verb got "installVersion" 11
npm ERR! gyp verb needs "installVersion" 9
npm ERR! gyp verb install version is good
npm ERR! gyp verb get node dir target node version installed: 20.4.0
npm ERR! gyp verb build dir attempting to create "build" dir: /home/patrikx3/Projects/sygnus/ng-ivr-sygkikoto/node_modules/iconv/build
npm ERR! gyp verb build dir "build" dir needed to be created? /home/patrikx3/Projects/sygnus/ng-ivr-sygkikoto/node_modules/iconv/build
npm ERR! gyp verb build/config.gypi creating config file
npm ERR! gyp ERR! UNCAUGHT EXCEPTION
npm ERR! gyp ERR! stack TypeError: Cannot assign to read only property 'cflags' of object '#<Object>'
npm ERR! gyp ERR! stack at createConfigFile (/home/patrikx3/Projects/sygnus/ng-ivr-sygkikoto/node_modules/node-gyp/lib/configure.js:117:21)
npm ERR! gyp ERR! stack at /home/patrikx3/Projects/sygnus/ng-ivr-sygkikoto/node_modules/node-gyp/lib/configure.js:84:9
npm ERR! gyp ERR! stack at FSReqCallback.oncomplete (node:fs:189:23)
npm ERR! gyp ERR! System Linux 5.19.0-43-generic
npm ERR! gyp ERR! command "/home/patrikx3/.nvm/versions/node/v20.4.0/bin/node" "/home/patrikx3/Projects/sygnus/ng-ivr-sygkikoto/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /home/patrikx3/Projects/sygnus/ng-ivr-sygkikoto/node_modules/iconv
npm ERR! gyp ERR! node -v v20.4.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! Node-gyp failed to build your package.
npm ERR! gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the package author.
That's an issue local to your system. Node 20.4.0 ships with npm 9.7.2 which in turn ships node-gyp 9.4.0, not 7.1.2. You probably have an older copy of npm or node-gyp on your path somewhere.
thanks
Can you remove the two files you added? Libraries shouldn't have a lock file or a .npmrc.
Can you explain why it's necessary to depend on node-gyp? I'm an erstwhile node-gyp maintainer and the advice I've doled out many times is to never, ever depend on node-gyp directly but instead simply trust the copy that comes with npm.