MoralisWeb3 / issue-tracker

25 stars 7 forks source link

ReferenceError: utils is not defined #71

Closed tpetmanson closed 3 years ago

tpetmanson commented 3 years ago

Hello Moralis team,

  1. Installed Moralis-CLI

npm install -g moralis-admin-cli

  1. Ran moralis-admin-cli deploy

Which resulted in error

Unexpected error
ReferenceError: utils is not defined
    at getApiKey (/usr/lib/node_modules/moralis-admin-cli/utils.js:16:89)
    at Object.getUserServers (/usr/lib/node_modules/moralis-admin-cli/utils.js:155:20)
    at /usr/lib/node_modules/moralis-admin-cli/commands/deploy.js:34:41
    at deploy (/usr/lib/node_modules/moralis-admin-cli/commands/deploy.js:74:7)
    at Object.<anonymous> (/usr/lib/node_modules/moralis-admin-cli/index.js:23:27)
    at Module._compile (node:internal/modules/cjs/loader:1109:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
    at Module.load (node:internal/modules/cjs/loader:989:32)
    at Function.Module._load (node:internal/modules/cjs/loader:829:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)

Seems to be failing at this line:

getApiKey = () => grab('--moralisApiKey') || grab('-k') || process.env.moralisApiKey || utils.requireInp
ut("Specify Moralis Api Key: ");

Function requireInput is defined later in the same file.

Node version: 16.1.0 Npm version: 7.13.0 Moralis-cli version: 2.0.7

gerardo15 commented 3 years ago

Hello.

Thanks for the post, it is fixed now on 2.0.8