Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grpc-web: Importing as ESModule in Node #273

Open
cd3367 opened this issue Dec 15, 2023 · 2 comments
Open

grpc-web: Importing as ESModule in Node #273

cd3367 opened this issue Dec 15, 2023 · 2 comments

Comments

@cd3367
Copy link

cd3367 commented Dec 15, 2023

/@InjectiveLabs+sdk-ts@1.14.4_debug@4.3.4/node_modules/@injectivelabs/sdk-ts/dist/esm/client/BaseGrpcConsumer.js:1

import { grpc } from '@injectivelabs/grpc-web';
^^^^
SyntaxError: Named export 'grpc' not found. The requested module '@injectivelabs/grpc-web' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from '@injectivelabs/grpc-web';
const { grpc } = pkg;

@bangjelkoski
Copy link
Collaborator

There is something off in your setup. We are using this in a lot of projects ourselves and have had no issues so far.

@cd3367
Copy link
Author

cd3367 commented Dec 16, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants