openupm/openupm-cli

Error: Cannot find module 'node:net'

TGChrisRArendt opened this issue · 3 comments

This appears on version 14.17.4 of node.

PS C:\Users\Christopher\Arendt Digital\Aboriginal> nvm use 14.17.4
Now using node v14.17.4 (64-bit)
PS C:\Users\Christopher\Arendt Digital\Aboriginal> npm install -g openupm-cli
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: 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.
C:\Program Files\nodejs\openupm-cli -> C:\Program Files\nodejs\node_modules\openupm-cli\bin\openupm
C:\Program Files\nodejs\openupm -> C:\Program Files\nodejs\node_modules\openupm-cli\bin\openupm
C:\Program Files\nodejs\openupm-cn -> C:\Program Files\nodejs\node_modules\openupm-cli\bin\openupm-cn
+ openupm-cli@1.15.3
added 292 packages from 154 contributors in 14.911s
PS C:\Users\Christopher\Arendt Digital\Aboriginal> openupm --version
internal/modules/cjs/loader.js:892
  throw err;
  ^

Error: Cannot find module 'node:net'
Require stack:
- C:\Users\Christopher\AppData\Roaming\nvm\v14.17.4\node_modules\openupm-cli\lib\core.js
- C:\Users\Christopher\AppData\Roaming\nvm\v14.17.4\node_modules\openupm-cli\lib\cmd-add.js
- C:\Users\Christopher\AppData\Roaming\nvm\v14.17.4\node_modules\openupm-cli\lib\cli.js
- C:\Users\Christopher\AppData\Roaming\nvm\v14.17.4\node_modules\openupm-cli\bin\openupm
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
    at Function.Module._load (internal/modules/cjs/loader.js:745:27)
    at Module.require (internal/modules/cjs/loader.js:961:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object.<anonymous> (C:\Users\Christopher\AppData\Roaming\nvm\v14.17.4\node_modules\openupm-cli\lib\core.js:9:13)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    at Module.load (internal/modules/cjs/loader.js:937:32)
    at Function.Module._load (internal/modules/cjs/loader.js:778:12)
    at Module.require (internal/modules/cjs/loader.js:961:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\Christopher\\AppData\\Roaming\\nvm\\v14.17.4\\node_modules\\openupm-cli\\lib\\core.js',
    'C:\\Users\\Christopher\\AppData\\Roaming\\nvm\\v14.17.4\\node_modules\\openupm-cli\\lib\\cmd-add.js',
    'C:\\Users\\Christopher\\AppData\\Roaming\\nvm\\v14.17.4\\node_modules\\openupm-cli\\lib\\cli.js',
    'C:\\Users\\Christopher\\AppData\\Roaming\\nvm\\v14.17.4\\node_modules\\openupm-cli\\bin\\openupm'
  ]
}
PS C:\Users\Christopher\Arendt Digital\Aboriginal> node --version
v14.17.4

FYI a workaround is to use 1.1.8 of nvm-windows w/16.13.2 of node.

Thanks for the bug report.

Please update to the latest node v14.

nvm install 14.19.2

'node:net' is available since node 14.18