Giter Site home page Giter Site logo

Comments (6)

yairopro avatar yairopro commented on August 22, 2024 1

It worked! thanks

from moralis-js-sdk.

b4rtaz avatar b4rtaz commented on August 22, 2024

How you import the SDK?

from moralis-js-sdk.

yairopro avatar yairopro commented on August 22, 2024
import Moralis from 'moralis';
import "@moralisweb3/common-evm-utils" // I tried to add this

from moralis-js-sdk.

b4rtaz avatar b4rtaz commented on August 22, 2024
  • Is this JavaScript project or TypeScript project?
  • Which version of the node and npm do you have?
  • Could paste the output of the console.log(Moralis) here?

from moralis-js-sdk.

yairopro avatar yairopro commented on August 22, 2024

A typescript project.
node: v16.17.0
npm: 9.1.1

but I use pnpm
pnpm: 7.30.5

console.log(Moralis)

<ref *1> [Function: Moralis] {
  ACL: [Function: ParseACL],
  Analytics: { track: [Function: track] },
  AnonymousUtils: {
    isLinked: [Function: isLinked],
    logIn: [Function: logIn],
    link: [Function: link],
    _getAuthProvider: [Function: _getAuthProvider]
  },
  Cloud: {
    getJobStatus: [Function: getJobStatus],
    getJobsData: [Function: getJobsData],
    run: [Function: run],
    startJob: [Function: startJob]
  },
  CLP: [Function: ParseCLP],
  CoreManager: {
    get: [Function: get],
    set: [Function: set],
    setAnalyticsController: [Function: setAnalyticsController],
    getAnalyticsController: [Function: getAnalyticsController],
    setCloudController: [Function: setCloudController],
    getCloudController: [Function: getCloudController],
    setConfigController: [Function: setConfigController],
    getConfigController: [Function: getConfigController],
    setCryptoController: [Function: setCryptoController],
    getCryptoController: [Function: getCryptoController],
    setFileController: [Function: setFileController],
    getFileController: [Function: getFileController],
    setInstallationController: [Function: setInstallationController],
    getInstallationController: [Function: getInstallationController],
    setObjectController: [Function: setObjectController],
    getObjectController: [Function: getObjectController],
    setObjectStateController: [Function: setObjectStateController],
    getObjectStateController: [Function: getObjectStateController],
    setPushController: [Function: setPushController],
    getPushController: [Function: getPushController],
    setQueryController: [Function: setQueryController],
    getQueryController: [Function: getQueryController],
    setRESTController: [Function: setRESTController],
    getRESTController: [Function: getRESTController],
    setSchemaController: [Function: setSchemaController],
    getSchemaController: [Function: getSchemaController],
    setSessionController: [Function: setSessionController],
    getSessionController: [Function: getSessionController],
    setStorageController: [Function: setStorageController],
    setLocalDatastoreController: [Function: setLocalDatastoreController],
    getLocalDatastoreController: [Function: getLocalDatastoreController],
    setLocalDatastore: [Function: setLocalDatastore],
    getLocalDatastore: [Function: getLocalDatastore],
    getStorageController: [Function: getStorageController],
    setAsyncStorage: [Function: setAsyncStorage],
    getAsyncStorage: [Function: getAsyncStorage],
    setWebSocketController: [Function: setWebSocketController],
    getWebSocketController: [Function: getWebSocketController],
    setUserController: [Function: setUserController],
    getUserController: [Function: getUserController],
    setLiveQueryController: [Function: setLiveQueryController],
    getLiveQueryController: [Function: getLiveQueryController],
    setHooksController: [Function: setHooksController],
    getHooksController: [Function: getHooksController]
  },
  Config: [Function: ParseConfig],
  Error: [Function: ParseError] {
    OTHER_CAUSE: -1,
    INTERNAL_SERVER_ERROR: 1,
    CONNECTION_FAILED: 100,
    OBJECT_NOT_FOUND: 101,
    INVALID_QUERY: 102,
    INVALID_CLASS_NAME: 103,
    MISSING_OBJECT_ID: 104,
    INVALID_KEY_NAME: 105,
    INVALID_POINTER: 106,
    INVALID_JSON: 107,
    COMMAND_UNAVAILABLE: 108,
    NOT_INITIALIZED: 109,
    INCORRECT_TYPE: 111,
    INVALID_CHANNEL_NAME: 112,
    PUSH_MISCONFIGURED: 115,
    OBJECT_TOO_LARGE: 116,
    OPERATION_FORBIDDEN: 119,
    CACHE_MISS: 120,
    INVALID_NESTED_KEY: 121,
    INVALID_FILE_NAME: 122,
    INVALID_ACL: 123,
    TIMEOUT: 124,
    INVALID_EMAIL_ADDRESS: 125,
    MISSING_CONTENT_TYPE: 126,
    MISSING_CONTENT_LENGTH: 127,
    INVALID_CONTENT_LENGTH: 128,
    FILE_TOO_LARGE: 129,
    FILE_SAVE_ERROR: 130,
    DUPLICATE_VALUE: 137,
    INVALID_ROLE_NAME: 139,
    EXCEEDED_QUOTA: 140,
    SCRIPT_FAILED: 141,
    VALIDATION_ERROR: 142,
    INVALID_IMAGE_DATA: 143,
    UNSAVED_FILE_ERROR: 151,
    INVALID_PUSH_TIME_ERROR: 152,
    FILE_DELETE_ERROR: 153,
    FILE_DELETE_UNNAMED_ERROR: 161,
    REQUEST_LIMIT_EXCEEDED: 155,
    DUPLICATE_REQUEST: 159,
    INVALID_EVENT_NAME: 160,
    USERNAME_MISSING: 200,
    PASSWORD_MISSING: 201,
    USERNAME_TAKEN: 202,
    EMAIL_TAKEN: 203,
    EMAIL_MISSING: 204,
    EMAIL_NOT_FOUND: 205,
    SESSION_MISSING: 206,
    MUST_CREATE_USER_THROUGH_SIGNUP: 207,
    ACCOUNT_ALREADY_LINKED: 208,
    INVALID_SESSION_TOKEN: 209,
    MFA_ERROR: 210,
    MFA_TOKEN_REQUIRED: 211,
    LINKED_ID_MISSING: 250,
    INVALID_LINKED_SESSION: 251,
    UNSUPPORTED_SERVICE: 252,
    INVALID_SCHEMA_OPERATION: 255,
    AGGREGATE_ERROR: 600,
    FILE_READ_ERROR: 601,
    X_DOMAIN_REQUEST: 602
  },
  FacebookUtils: {
    init: [Function: init],
    isLinked: [Function: isLinked],
    logIn: [Function: logIn],
    link: [Function: link],
    unlink: [Function: unlink],
    _getAuthProvider: [Function: _getAuthProvider]
  },
  File: [Function: ParseFile],
  GeoPoint: [Function: ParseGeoPoint],
  Polygon: [Function: ParsePolygon],
  Installation: [Function: Installation] { className: '_Installation' },
  LocalDatastore: {
    isEnabled: false,
    isSyncing: false,
    fromPinWithName: [Function: fromPinWithName],
    pinWithName: [Function: pinWithName],
    unPinWithName: [Function: unPinWithName],
    _getAllContents: [Function: _getAllContents],
    _getRawStorage: [Function: _getRawStorage],
    _clear: [Function: _clear],
    _handlePinAllWithName: [Function: _handlePinAllWithName],
    _handleUnPinAllWithName: [Function: _handleUnPinAllWithName],
    _getChildren: [Function: _getChildren],
    _traverse: [Function: _traverse],
    _serializeObjectsFromPinName: [Function: _serializeObjectsFromPinName],
    _serializeObject: [Function: _serializeObject],
    _updateObjectIfPinned: [Function: _updateObjectIfPinned],
    _destroyObjectIfPinned: [Function: _destroyObjectIfPinned],
    _updateLocalIdForObject: [Function: _updateLocalIdForObject],
    updateFromServer: [Function: updateFromServer],
    getKeyForObject: [Function: getKeyForObject],
    getPinName: [Function: getPinName],
    checkIfEnabled: [Function: checkIfEnabled]
  },
  Object: [Function: ParseObject],
  Op: {
    Set: [Function: SetOp],
    Unset: [Function: UnsetOp],
    Increment: [Function: IncrementOp],
    Add: [Function: AddOp],
    Remove: [Function: RemoveOp],
    AddUnique: [Function: AddUniqueOp],
    Relation: [Function: RelationOp]
  },
  Web3API: [Function: Web3Api] {
    baseURL: 'https://deep-index.moralis.io/api/v2',
    BodyParamTypes: { setBody: 'set body', property: 'property' },
    checkObjEqual: [Function (anonymous)],
    native: {
      getBlock: [Function (anonymous)],
      getDateToBlock: [Function (anonymous)],
      getLogsByAddress: [Function (anonymous)],
      getNFTTransfersByBlock: [Function (anonymous)],
      getTransaction: [Function (anonymous)],
      getContractEvents: [Function (anonymous)],
      runContractFunction: [Function (anonymous)]
    },
    account: {
      getTransactions: [Function (anonymous)],
      getNativeBalance: [Function (anonymous)],
      getTokenBalances: [Function (anonymous)],
      getTokenTransfers: [Function (anonymous)],
      getNFTs: [Function (anonymous)],
      getNFTTransfers: [Function (anonymous)],
      getNFTsForContract: [Function (anonymous)]
    },
    token: {
      getTokenMetadata: [Function (anonymous)],
      getNFTTrades: [Function (anonymous)],
      getNFTLowestPrice: [Function (anonymous)],
      getTokenMetadataBySymbol: [Function (anonymous)],
      getTokenPrice: [Function (anonymous)],
      getTokenAddressTransfers: [Function (anonymous)],
      getTokenAllowance: [Function (anonymous)],
      searchNFTs: [Function (anonymous)],
      getNftTransfersFromToBlock: [Function (anonymous)],
      getAllTokenIds: [Function (anonymous)],
      getContractNFTTransfers: [Function (anonymous)],
      getNFTOwners: [Function (anonymous)],
      getNFTMetadata: [Function (anonymous)],
      reSyncMetadata: [Function (anonymous)],
      getTokenIdMetadata: [Function (anonymous)],
      getTokenIdOwners: [Function (anonymous)],
      getWalletTokenIdTransfers: [Function (anonymous)]
    },
    contract: { syncNFTContract: [Function (anonymous)] },
    resolve: {
      resolveDomain: [Function (anonymous)],
      resolveAddress: [Function (anonymous)]
    },
    defi: {
      getPairReserves: [Function (anonymous)],
      getPairAddress: [Function (anonymous)]
    },
    storage: { uploadFolder: [Function (anonymous)] },
    info: {
      web3ApiVersion: [Function (anonymous)],
      endpointWeights: [Function (anonymous)]
    }
  },
  SolanaAPI: [Function: SolanaApi] {
    baseURL: 'https://solana-gateway.moralis.io',
    BodyParamTypes: { setBody: 'set body', property: 'property' },
    account: {
      balance: [Function (anonymous)],
      getSPL: [Function (anonymous)],
      getNFTs: [Function (anonymous)],
      getPortfolio: [Function (anonymous)]
    },
    nft: { getNFTMetadata: [Function (anonymous)] },
    token: { getTokenPrice: [Function (anonymous)] }
  },
  Push: { send: [Function: send] },
  Query: [Function: ParseQuery],
  Relation: [Function: ParseRelation],
  Role: [Function: ParseRole] { className: '_Role' },
  Schema: [Function: ParseSchema],
  Session: [Function: ParseSession] { className: '_Session' },
  Storage: {
    async: [Function: async],
    getItem: [Function: getItem],
    getItemAsync: [Function: getItemAsync],
    setItem: [Function: setItem],
    setItemAsync: [Function: setItemAsync],
    removeItem: [Function: removeItem],
    removeItemAsync: [Function: removeItemAsync],
    getAllKeys: [Function: getAllKeys],
    getAllKeysAsync: [Function: getAllKeysAsync],
    generatePath: [Function: generatePath],
    _clear: [Function: _clear]
  },
  User: [Function: ParseUser] { className: '_User' },
  LiveQuery: EventEmitter {
    _events: [Object: null prototype] { error: [Function (anonymous)] },
    _eventsCount: 1,
    _maxListeners: undefined,
    open: [Function (anonymous)],
    close: [Function (anonymous)],
    [Symbol(kCapture)]: false
  },
  LiveQueryClient: [Function: LiveQueryClient],
  Web3: [Circular *1],
  Units: [Function: UnitConverter],
  Elrond: [Function: MoralisErd],
  Erd: [Function: MoralisErd],
  Dot: [Function: MoralisDot],
  UI: { openPrompt: [Function: openPrompt] },
  Chains: {
    ETH_MAINNET: '0x1',
    ETH_ROPSTEN: '0x3',
    ETH_GOERLI: '0x5',
    ETH_KOVAN: '0x2a',
    ETH_RINKEBY: '0x4',
    ETH_LOCALDEVCHAIN: '0x539',
    POLYGON_MAINNET: '0x89',
    POLYGON_MUMBAI: '0x13881',
    BSC_MAINNET: '0x38',
    BSC_TESTNET: '0x61',
    AVAX_MAINNET: '0xa86a',
    AVAX_TESTNET: '0xa869',
    FANTOM_MAINNET: '0xfa',
    CRONOS_MAINNET: '0x19',
    CRONOS_TESTNET: '0x152'
  },
  AbstractWeb3Connector: [Function: AbstractWeb3Connector],
  _request: [Function (anonymous)],
  _ajax: [Function (anonymous)],
  _decode: [Function (anonymous)],
  _encode: [Function (anonymous)],
  _getInstallationId: [Function (anonymous)],
  enableLocalDatastore: [Function (anonymous)],
  isLocalDatastoreEnabled: [Function (anonymous)],
  dumpLocalDatastore: [Function (anonymous)],
  enableEncryptedUser: [Function (anonymous)],
  isEncryptedUserEnabled: [Function (anonymous)],
  Moralis: [Circular *1]
}

from moralis-js-sdk.

b4rtaz avatar b4rtaz commented on August 22, 2024

Could you update the package version to 2.20.0? I see now you use the 1.x version, the documentation is for 2.x.

from moralis-js-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.