openupm / openupm

OpenUPM - Open Source Unity Package Registry (UPM)

Home Page:https://openupm.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to add or search packages

strike-zero opened this issue · comments

Bug report

Bug category

  • Website: issues related to browse or discover packages.
  • Pipelines: issues related to publish or manage a package.
  • Registry: issues related to the registry server.
  • Unity Editor: issues related to how OpenUPM works with the Unity Editor.
  • Documentation
  • Others

Steps to reproduce

Run any add or search command eg:
openupm search example
or
openupm add com.example.package

What is expected?

A list of available packages shown
or
A package gets added to the package manifest

What is actually happening?

The following output:

C:\Users\User\AppData\Roaming\npm\node_modules\openupm-cli\lib\core.js:39
  log.level = options.parent.verbose ? "verbose" : "notice";
                             ^

TypeError: Cannot read properties of undefined (reading 'verbose')
    at parseEnv (C:\Users\User\AppData\Roaming\npm\node_modules\openupm-cli\lib\core.js:39:30)
    at module.exports (C:\Users\User\AppData\Roaming\npm\node_modules\openupm-cli\lib\cmd-search.js:79:23)
    at Command.<anonymous> (C:\Users\User\AppData\Roaming\npm\node_modules\openupm-cli\lib\cli.js:62:27)
    at Command.listener [as _actionHandler] (C:\Users\User\AppData\Roaming\npm\node_modules\openupm-cli\node_modules\commander\lib\command.js:481:17)
    at C:\Users\User\AppData\Roaming\npm\node_modules\openupm-cli\node_modules\commander\lib\command.js:1237:65
    at Command._chainOrCall (C:\Users\User\AppData\Roaming\npm\node_modules\openupm-cli\node_modules\commander\lib\command.js:1153:12)
    at Command._parseCommand (C:\Users\User\AppData\Roaming\npm\node_modules\openupm-cli\node_modules\commander\lib\command.js:1237:27)
    at Command._dispatchSubcommand (C:\Users\User\AppData\Roaming\npm\node_modules\openupm-cli\node_modules\commander\lib\command.js:1059:25)
    at Command._parseCommand (C:\Users\User\AppData\Roaming\npm\node_modules\openupm-cli\node_modules\commander\lib\command.js:1202:19)
    at Command.parse (C:\Users\User\AppData\Roaming\npm\node_modules\openupm-cli\node_modules\commander\lib\command.js:890:10)

Node.js v17.9.0

Other relevant information

  • I'm using openupm 1.15.1
  • Replacing all instances of options.parent to options in core.js seems to make it work again

Please update nodejs to 14.18 or above. https://nodejs.org/en/download/

And update openupm-cli to 1.15.4

npm install -g openupm-cli@latest