-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
While trying to Add-Type Find-VisualStudio.cs: Add-Type : Cannot add type. Compilation errors occurred #2981
Comments
Please provide the command typed and the full error log. |
Do you mean the part under Verbose output (from npm or node-gyp) that starts with |
I also added the npm debug log but there's not much there. |
One other data point. I'm in the process of configuring a set of CI build machines, adding four more to an existing set of four. The CI job that I'm testing on the new machines is the one that's failing with this error. The job runs ok on the original build machines. The interesting thing is that on the original machines there is no |
Is the version of |
Yes - npm 10.2.3 |
The URL above points to some commands that should prove that those config vars are no longer valid on modern
|
Ahh - That explains why when I tried using |
If you set them in |
Yes:
|
I found a fix. Adding I'm not sure where the |
This fix also works if I remove the msvs_version and msbuild_path settings from ~/.npmrc. |
Do you have any comments or suggestions for our docs or #2959? |
Both Windows and Node are outside of my usual domain so my understanding is somewhat limited, otherwise I might have some better feedback. Looking at the docs I don't see Another datapoint I have is on this part of the README:
It worked for me without installing VSSetup. On a different topic: Should I submit a PR to add |
Also facing this one. |
@sourcedelica Can this be closed? |
Could you clarify what you were asking - either, can this issue (#2981) be closed, or the one you linked (mapbox/node-pre-gyp#657) be closed? I can't comment on the second issue but the original problem (this issue, #2981) is still a problem - we're still patching |
I was asking if this issue be closed. Can you replicate this problem without using mapbox/node-pre-gyp#712 demonstrates that support in |
To make
|
.npmrc:
Verbose output (from npm or node-gyp):
npm debug log:
``` 0 verbose cli C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js 1 info using [email protected] 2 info using [email protected] 3 timing npm:load:whichnode Completed in 3ms 4 timing config:load:defaults Completed in 3ms 5 timing config:load:file:C:\ProgramData\nvm\v18.19.0\node_modules\npm\npmrc Completed in 2ms 6 timing config:load:builtin Completed in 3ms 7 timing config:load:cli Completed in 2ms 8 timing config:load:env Completed in 1ms 9 timing config:load:file:C:\Users\svc_platform\ericp\llm-core\build\llm\bindings\node\.npmrc Completed in 1ms 10 timing config:load:project Completed in 2ms 11 timing config:load:file:C:\Users\svc_platform\.npmrc Completed in 2ms 12 timing config:load:user Completed in 2ms 13 timing config:load:file:C:\Program Files\nodejs\etc\npmrc Completed in 0ms 14 timing config:load:global Completed in 0ms 15 timing config:load:setEnvs Completed in 1ms 16 timing config:load Completed in 15ms 17 timing npm:load:configload Completed in 15ms 18 timing config:load:flatten Completed in 3ms 19 timing npm:load:mkdirpcache Completed in 0ms 20 timing npm:load:mkdirplogs Completed in 0ms 21 verbose title npm install 22 verbose argv "install" "--build-from-source" 23 timing npm:load:setTitle Completed in 2ms 24 timing npm:load:display Completed in 1ms 25 verbose logfile logs-max:10 dir:C:\Users\svc_platform\AppData\Local\npm-cache\_logs\2024-02-11T02_23_13_016Z- 26 verbose logfile C:\Users\svc_platform\AppData\Local\npm-cache\_logs\2024-02-11T02_23_13_016Z-debug-0.log 27 timing npm:load:logFile Completed in 12ms 28 timing npm:load:timers Completed in 0ms 29 timing npm:load:configScope Completed in 0ms 30 timing npm:load Completed in 60ms 31 timing arborist:ctor Completed in 0ms 32 silly logfile start cleaning logs, removing 2 files 33 timing idealTree:init Completed in 47ms 34 timing idealTree:userRequests Completed in 0ms 35 silly idealTree buildDeps 36 timing idealTree:#root Completed in 0ms 37 timing idealTree:buildDeps Completed in 2ms 38 timing idealTree:fixDepFlags Completed in 0ms 39 timing idealTree Completed in 51ms 40 silly logfile done cleaning log files 41 timing arborist:ctor Completed in 0ms 42 timing reify:loadTrees Completed in 68ms 43 timing reify:diffTrees Completed in 5ms 44 silly reify moves {} 45 timing reify:retireShallow Completed in 1ms 46 timing reify:createSparse Completed in 0ms 47 timing reify:loadBundles Completed in 0ms 48 silly audit bulk request { 48 silly audit '@mapbox/node-pre-gyp': [ '1.0.10' ], 48 silly audit abbrev: [ '1.1.1' ], 48 silly audit 'agent-base': [ '6.0.2' ], 48 silly audit 'ansi-regex': [ '5.0.1' ], 48 silly audit aproba: [ '2.0.0' ], 48 silly audit 'are-we-there-yet': [ '2.0.0' ], 48 silly audit 'balanced-match': [ '1.0.2' ], 48 silly audit 'brace-expansion': [ '1.1.11' ], 48 silly audit chownr: [ '2.0.0' ], 48 silly audit 'color-support': [ '1.1.3' ], 48 silly audit 'concat-map': [ '0.0.1' ], 48 silly audit 'console-control-strings': [ '1.1.0' ], 48 silly audit debug: [ '4.3.4' ], 48 silly audit delegates: [ '1.0.0' ], 48 silly audit 'detect-libc': [ '2.0.2' ], 48 silly audit 'emoji-regex': [ '8.0.0' ], 48 silly audit 'fs-minipass': [ '2.1.0' ], 48 silly audit minipass: [ '3.3.6', '5.0.0' ], 48 silly audit 'fs.realpath': [ '1.0.0' ], 48 silly audit gauge: [ '3.0.2' ], 48 silly audit glob: [ '7.2.3' ], 48 silly audit 'has-unicode': [ '2.0.1' ], 48 silly audit 'https-proxy-agent': [ '5.0.1' ], 48 silly audit inflight: [ '1.0.6' ], 48 silly audit inherits: [ '2.0.4' ], 48 silly audit 'is-fullwidth-code-point': [ '3.0.0' ], 48 silly audit 'lru-cache': [ '6.0.0' ], 48 silly audit 'make-dir': [ '3.1.0' ], 48 silly audit semver: [ '6.3.1', '7.6.0' ], 48 silly audit minimatch: [ '3.1.2' ], 48 silly audit minizlib: [ '2.1.2' ], 48 silly audit mkdirp: [ '1.0.4' ], 48 silly audit ms: [ '2.1.2' ], 48 silly audit 'node-addon-api': [ '6.1.0' ], 48 silly audit 'node-fetch': [ '2.7.0' ], 48 silly audit nopt: [ '5.0.0' ], 48 silly audit npmlog: [ '5.0.1' ], 48 silly audit 'object-assign': [ '4.1.1' ], 48 silly audit once: [ '1.4.0' ], 48 silly audit 'path-is-absolute': [ '1.0.1' ], 48 silly audit 'readable-stream': [ '3.6.2' ], 48 silly audit rimraf: [ '3.0.2' ], 48 silly audit 'safe-buffer': [ '5.2.1' ], 48 silly audit 'set-blocking': [ '2.0.0' ], 48 silly audit 'signal-exit': [ '3.0.7' ], 48 silly audit string_decoder: [ '1.3.0' ], 48 silly audit 'string-width': [ '4.2.3' ], 48 silly audit 'strip-ansi': [ '6.0.1' ], 48 silly audit tar: [ '6.2.0' ], 48 silly audit tr46: [ '0.0.3' ], 48 silly audit 'util-deprecate': [ '1.0.2' ], 48 silly audit 'webidl-conversions': [ '3.0.1' ], 48 silly audit 'whatwg-url': [ '5.0.0' ], 48 silly audit 'wide-align': [ '1.1.5' ], 48 silly audit wrappy: [ '1.0.2' ], 48 silly audit yallist: [ '4.0.0' ] 48 silly audit } 49 timing reify:unpack Completed in 3ms 50 timing reify:unretire Completed in 34ms 51 timing build:queue Completed in 0ms 52 timing build:deps Completed in 0ms 53 timing build Completed in 0ms 54 timing reify:build Completed in 1ms 55 timing reify:trash Completed in 0ms 56 timing reify:save Completed in 28ms 57 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 215ms 58 timing auditReport:getReport Completed in 220ms 59 silly audit report {} 60 timing auditReport:init Completed in 0ms 61 timing reify:audit Completed in 220ms 62 timing reify Completed in 303ms 63 timing command:install Completed in 1862ms 64 verbose stack Error: command failed 64 verbose stack at ChildProcess. (C:\ProgramData\nvm\v18.19.0\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:53:27) 64 verbose stack at ChildProcess.emit (node:events:517:28) 64 verbose stack at maybeClose (node:internal/child_process:1098:16) 64 verbose stack at ChildProcess._handle.onexit (node:internal/child_process:303:5) 65 verbose pkgid @tw/[email protected] 66 verbose cwd C:\Users\svc_platform\ericp\llm-core\build\llm\bindings\node 67 verbose Windows_NT 10.0.20348 68 verbose node v18.19.0 69 verbose npm v10.2.3 70 error code 1 71 error path C:\Users\svc_platform\ericp\llm-core\build\llm\bindings\node 72 error command failed 73 error command C:\Windows\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build -j max --loglevel silly 74 verbose exit 1 75 timing npm Completed in 2349ms 76 verbose code 1 77 error A complete log of this run can be found in: C:\Users\svc_platform\AppData\Local\npm-cache\_logs\2024-02-11T02_23_13_016Z-debug-0.log ```The problem seems to be
I tried running the same command from the Powershell command line and it worked fine:
The text was updated successfully, but these errors were encountered: