Tamilchuder
Tamilchuder

Reputation: 19

In Guidewire Test Framework (GTF) while running "npm install" command, "node_modules" folder creating and deleting automatically

I am setting up the GTF Guide Test Framework with the version Hakuba and running the npm install command, following this the "node_modules" folders get created and deleted automatically. Please refer to the below error details.

PS C:\Users\123456\GTF\guidewiretestingframework-GTF> npm install
(node:31888) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
(Use `node --trace-deprecation ...` to show where the warning was created)
npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-methods instead.
npm WARN deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.
npm WARN deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-async-generator-functions instead.
npm WARN deprecated [email protected]: 0.x is no longer supported. Please upgrade to 4.x or higher.
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated       
npm WARN deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead.
npm WARN deprecated [email protected]: Please use @electron/asar moving forward.  There is no API change, just a package name change
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.     
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.     
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.     
npm WARN deprecated [email protected]: This package is now published under @cucumber/messages
npm WARN deprecated [email protected]: This package is now published under @cucumber/gherkin
npm ERR! code 1
npm ERR! path C:\Users\12345\GTF\guidewiretestingframework-GTF\node_modules\java
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 [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.4 found at "C:\Users\12345\AppData\Local\Programs\Python\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 could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
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:\Users\12345\GTF\guidewiretestingframework-GTF\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
npm ERR! gyp ERR! stack     at C:\Users\10724480\GTF\guidewiretestingframework-GTF\node_modules\node-gyp\lib\find-visualstudio.js:74:16
npm ERR! gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Users\12345\GTF\guidewiretestingframework-GTF\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
npm ERR! gyp ERR! stack     at C:\Users\12345\GTF\guidewiretestingframework-GTF\node_modules\node-gyp\lib\find-visualstudio.js:70:14
npm ERR! gyp ERR! stack     at C:\Users\12345\GTF\guidewiretestingframework-GTF\node_modules\node-gyp\lib\find-visualstudio.js:372:16
npm ERR! gyp ERR! stack     at C:\Users\12345\GTF\guidewiretestingframework-GTF\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack     at C:\Users\12345\GTF\guidewiretestingframework-GTF\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack     at ChildProcess.exithandler (node:child_process:430:5)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:519:28)
npm ERR! gyp ERR! stack     at maybeClose (node:internal/child_process:1105:16)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:305:5)
npm ERR! gyp ERR! System Windows_NT 10.0.22621
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\12345\\GTF\\guidewiretestingframework-GTF\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\12345\GTF\guidewiretestingframework-GTF\node_modules\java   
npm ERR! gyp ERR! node -v v21.5.0
npm ERR! gyp ERR! node-gyp -v v8.2.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\12345\AppData\Local\npm-cache\_logs\2024-01-18T18_34_49_335Z-debug.log

Please let me know what mistake I am doing. Thanks in advance.

Upvotes: 1

Views: 223

Answers (1)

Edgar D.
Edgar D.

Reputation: 176

To get around this issue you need to, as Abhijay suggests, install Visual Studio, however there is an additional step you need.

For the node-gyp issue you need to make sure Visual Studio Tools is installed. Note: only version 2017 through 2019 will to work.

At the command prompt set VCINSTALLDIR to the directory BuildTools is installed in plus /banana. The banana is just a fun reminder that you have to have the value set to a directory inside of the BuildTools. The script strips off the last part of the path to find the tools. As an example

SET VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\banana

Upvotes: 1

Related Questions