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

"npm install" giving errors during client setup #136

Open
aravind-cebs opened this issue Jul 13, 2023 · 3 comments
Open

"npm install" giving errors during client setup #136

aravind-cebs opened this issue Jul 13, 2023 · 3 comments

Comments

@aravind-cebs
Copy link

I am trying to install MSW in a windows machine and facing below error while running "npm install" during client setup.

Error:
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'C:\Users\admin\repos\IMO-Maritime-Single-Window\IMOMaritimeSingleWindow\Client\node_modules\node-sass\build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! Traceback (most recent call last):
npm ERR! File "C:\Users\admin\repos\IMO-Maritime-Single-Window\IMOMaritimeSingleWindow\Client\node_modules\node-gyp\gyp\gyp_main.py", line 16, in
npm ERR! sys.exit(gyp.script_main())
npm ERR! File "C:\Users\admin\repos\IMO-Maritime-Single-Window\IMOMaritimeSingleWindow\Client\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 545, in script_main
npm ERR! return main(sys.argv[1:])
npm ERR! File "C:\Users\admin\repos\IMO-Maritime-Single-Window\IMOMaritimeSingleWindow\Client\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 538, in main
npm ERR! return gyp_main(args)
npm ERR! File "C:\Users\admin\repos\IMO-Maritime-Single-Window\IMOMaritimeSingleWindow\Client\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 514, in gyp_main
npm ERR! options.duplicate_basename_check)
npm ERR! File "C:\Users\admin\repos\IMO-Maritime-Single-Window\IMOMaritimeSingleWindow\Client\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 130, in Load
npm ERR! params['parallel'], params['root_targets'])
npm ERR! File "C:\Users\admin\repos\IMO-Maritime-Single-Window\IMOMaritimeSingleWindow\Client\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 2783, in Load
npm ERR! variables, includes, depth, check, True)
npm ERR! File "C:\Users\admin\repos\IMO-Maritime-Single-Window\IMOMaritimeSingleWindow\Client\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 399, in LoadTargetBuildFile
npm ERR! includes, True, check)
npm ERR! File "C:\Users\admin\repos\IMO-Maritime-Single-Window\IMOMaritimeSingleWindow\Client\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 271, in LoadOneBuildFile
npm ERR! aux_data, includes, check)
npm ERR! File "C:\Users\admin\repos\IMO-Maritime-Single-Window\IMOMaritimeSingleWindow\Client\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 308, in LoadBuildFileIncludesIntoDict
npm ERR! LoadOneBuildFile(include, data, aux_data, None, False, check),
npm ERR! File "C:\Users\admin\repos\IMO-Maritime-Single-Window\IMOMaritimeSingleWindow\Client\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 251, in LoadOneBuildFile
npm ERR! None)
npm ERR! File "C:\Users\admin.node-gyp\20.4.0\include\node\common.gypi", line 1
npm ERR! nerate ',
npm ERR! ^
npm ERR! SyntaxError: EOL while scanning string literal
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: gyp failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (C:\Users\admin\repos\IMO-Maritime-Single-Window\IMOMaritimeSingleWindow\Client\node_modules\node-gyp\lib\configure.js:345:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:512:28)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:293:12)
npm ERR! gyp ERR! System Windows_NT 10.0.20348
npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\admin\repos\IMO-Maritime-Single-Window\IMOMaritimeSingleWindow\Client\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd C:\Users\admin\repos\IMO-Maritime-Single-Window\IMOMaritimeSingleWindow\Client\node_modules\node-sass
npm ERR! gyp ERR! node -v v20.4.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1

npm ERR! A complete log of this run can be found in: C:\Users\admin\AppData\Local\npm-cache_logs\2023-07-13T16_06_53_081Z-debug-0.log

@aravind-cebs
Copy link
Author

@aravind-cebs
Copy link
Author

Attached the full log file

@falniir
Copy link
Collaborator

falniir commented Jul 1, 2024

I've ran into the same issue myself and it looks like node-gyp can't be built with node v20.4.0. I'd recommend you try with version 10.24:
https://nodejs.org/en/blog/release/v10.24.0

We've updated the guide and included docker files that set up the application within containers, let me know if you encounter any more issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants