Skip to content

[Team Name] Can't import nagaDev in v8 #958

@CodeSandwich

Description

@CodeSandwich

Is there an existing issue for this?

  • I have searched the existing issues

SDK version

8.0.2

Lit Network

Wished

Description of the bug/issue

Importing @lit-protocol/networks causes an error.

Severity of the bug

Negative severity. It prevents the usage of Lit and exposure to any risks. Couldn't be safer.

Steps To Reproduce

I have a trivial node.js project with this package.json:

{
  "name": "oracle",
  "version": "0.0.1",
  "scripts": {
    "sandbox": "node -e 'require(`./index.js`).sandbox()'"
  },
  "dependencies": {
    "@lit-protocol/lit-client": "^8.0.2",
    "@lit-protocol/networks": "^8.0.2"
  }
}

and this index.js:

import { nagaDev } from "@lit-protocol/networks";
export async function sandbox() {}

After removing node_modules and package_lock.json and running npm install, I tried running npm run sandbox and got this error:

> [email protected] sandbox
> node -e 'require(`./oracle.js`).sandbox()'

lit-js-sdk:constants:errors deprecated LitErrorKind is deprecated and will be removed in a future version. Use LIT_ERROR_KIND instead. node:internal/modules/cjs/loader:1734:14
file:///home/zuczek/workspace/drips-contracts/oracle/node_modules/@wagmi/core/dist/esm/actions/sendCallsSync.js:1
import { sendCallsSync as viem_sendCallsSync, } from 'viem/actions';
         ^^^^^^^^^^^^^

SyntaxError: The requested module 'viem/actions' does not provide an export named 'sendCallsSync'
    at ModuleJobSync.runSync (node:internal/modules/esm/module_job:387:37)
    at ModuleLoader.importSyncForRequire (node:internal/modules/esm/loader:427:47)
    at loadESMFromCJS (node:internal/modules/cjs/loader:1565:24)
    at Module._compile (node:internal/modules/cjs/loader:1716:5)
    at Object..js (node:internal/modules/cjs/loader:1899:10)
    at Module.load (node:internal/modules/cjs/loader:1469:32)
    at Function._load (node:internal/modules/cjs/loader:1286:12)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
    at Module.require (node:internal/modules/cjs/loader:1491:12)

Node.js v23.11.0

Link to code

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions