Hi Team, after updating the pact version to this `...
# pact-js
h
Hi Team, after updating the pact version to this
"@pact-foundation/pact": "11.0.2"
,
npm install
is failing in my local system. Should I update the node version in my system? Currently it is 16.18.0.
m
I’m using v16.16.0 and “@pact-foundation/pact”: “^11.0.2",
m
What's the error?
y
should i update node? probably not, i doubt that is your issue. please note we have no idea about what your local system consists of, nor the error message you are receiving therefore it is almost impossible to help you.
please provide more information
h
I am sharing the error message in 2 minutes
npm ci
npm WARN deprecated mkdirp@0.3.0: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promis
es in 1.x.)
npm WARN deprecated puppeteer@9.1.1: < 19.4.0 is no longer supported
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup  [
npm WARN cleanup    'C:\\testProject\\node_modules\\puppeteer',
npm WARN cleanup    [Error: EBUSY: resource busy or locked, rmdir 'C:\mfe-home\node_modules\puppeteer'] {
npm WARN cleanup      errno: -4082,
npm WARN cleanup      code: 'EBUSY',
npm WARN cleanup      syscall: 'rmdir',
npm WARN cleanup      path: 'C:\\testProject\\node_modules\\puppeteer'
npm WARN cleanup    }
npm WARN cleanup  ],
npm WARN cleanup  [
npm WARN cleanup    'C:\\testProject\\node_modules',
npm WARN cleanup    [Error: EBUSY: resource busy or locked, rmdir 'C:\testProject\node_modules\puppeteer'] {
npm WARN cleanup      errno: -4082,
npm WARN cleanup      code: 'EBUSY',
npm WARN cleanup      syscall: 'rmdir',
npm WARN cleanup      path: 'C:\\testProject\\node_modules\\puppeteer'
npm WARN cleanup    }
npm WARN cleanup  ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\testProject\node_modules\@pact-foundation\pact-core
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.1.0
npm ERR! gyp info using node@16.18.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.1 found at "C:\Python310\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS checking VS2022 (17.6.33723.286) found at:
npm ERR! gyp ERR! find VS "D:\Visual Studio"
npm ERR! gyp ERR! find VS - found "Visual Studio C++ core features"
npm ERR! gyp ERR! find VS - missing any VC++ toolset
npm ERR! gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS <https://github.com/nodejs/node-gyp#on-windows>
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack    at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
npm ERR! gyp ERR! stack    at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:75:16
npm ERR! gyp ERR! stack    at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:364:14
)
npm ERR! gyp ERR! stack    at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:71:14
npm ERR! gyp ERR! stack    at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:385:16
npm ERR! gyp ERR! stack    at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack    at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack    at ChildProcess.exithandler (node:child_process:410:5)
npm ERR! gyp ERR! stack    at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack    at maybeClose (node:internal/child_process:1100:16)
npm ERR! gyp ERR! System Windows_NT 10.0.19045
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\testProject\node_modules\@pact-foundation\pact-core
npm ERR! gyp ERR! node -v v16.18.0
npm ERR! gyp ERR! node-gyp -v v9.1.0
npm ERR! gyp ERR! not ok
@Yousaf Nabi (pactflow.io) please let me know if the above error is sufficient.
y
have you clicked on the link re node gyp and followed the windows instructions
h
not yet
y
message has been deleted
well why would you expect it to work
h
Makes sense! I'l try this and update if it works.
y
:) it is noted in the troubleshooting guide https://github.com/pact-foundation/pact-js/blob/master/docs/troubleshooting.md#installation-failing-missing-python-c-or-build-tools unfortunately we can’t catch this earlier and detect a different message to present to the user but i’m hoping to get a pr reviewed to include all the dependencies in the package so you won’t need a full tool chain to install pact js :)
👍 1
h
yes, that would be helpful as well.
👍 1