-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Named export 'buf' not found in module 'crc-32' #6034
Comments
It seems all these errors are because you changed the project from CommonJS to ESM. |
@sharifzadesina In 4.x RC.1 there is both ESM and CJS builds. |
Hello @jdevcs, package.json: {
"name": "test",
"type": "module",
"dependencies": {
"web3": "^4.0.1-rc.1"
},
"devDependencies": {
"ts-node": "^10.9.1",
"tsx": "^3.12.6"
}
}
tsconfig.json: {
"include": ["src/**/*.ts"],
"exclude": ["node_modules/**"],
"ts-node": {
"esm": true,
"experimentalSpecifierResolution": "node"
},
"compilerOptions": {
"target": "ES2022",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"declaration": true,
"outDir": "dist",
"inlineSourceMap": true,
"removeComments": true,
"module": "ES2022",
"moduleResolution": "node",
"rootDir": "src",
"skipLibCheck": true,
"strict": true,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noPropertyAccessFromIndexSignature": true,
"noUncheckedIndexedAccess": true
}
} src/test.ts file: import { Web3 } from 'web3';
console.log(Web3); Runnig using
Runnig using
|
@sharifzadesina Thanks for testing 4.x RC.1 and sharing feedback. |
Is there an existing issue for this?
Current Behavior
Hello,
As of RC.1 I am getting this error below, it seems you are trying to import a CommonJS module with named exports and it fails.
Expected Behavior
There shouldn't be any error.
Steps to Reproduce
Just run.
Web3.js Version
v4.0.1-rc.1
Environment
Anything Else?
No response
The text was updated successfully, but these errors were encountered: