Closed george-of-croton closed 11 months ago
The master code of git is v5.3.1. And it hasn't been published to npm. So the build result is different.
it seems like the current node build on NPM is broken then?
node:internal/modules/cjs/loader:1024
throw err;
^
Error: Cannot find module '@noble/secp256k1'
Require stack:
- /workspace/backend/backend/node_modules/tronweb/dist/TronWeb.node.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1021:15)
at Function.Module._load (node:internal/modules/cjs/loader:866:27)
at Module.require (node:internal/modules/cjs/loader:1093:19)
at require (node:internal/modules/cjs/helpers:108:18)
at /workspace/backend/backend/node_modules/tronweb/dist/TronWeb.node.js:1:296510
at /workspace/backend/backend/node_modules/tronweb/dist/TronWeb.node.js:1:694217
at Object.<anonymous> (/workspace/backend/backend/node_modules/tronweb/dist/TronWeb.node.js:1:694246)
at Module._compile (node:internal/modules/cjs/loader:1191:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1245:10)
at Module.load (node:internal/modules/cjs/loader:1069:32) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/workspace/backend/backend/node_modules/tronweb/dist/TronWeb.node.js'
]
}
steps to reproduce:
write a file that require tronweb. run node <path to your script>
example:
const tronweb = require("tronweb");
console.log(tronweb)
You can use "tronweb": "5.2.0" - without caret . Its working for me
You can now using npm i @noble/secp256k1@1.7.1
to solve this problem. Soon, we'll publish tronweb@5.3.1.
node build still seems to use the @noble/secp256k1 package. I built it locally and it seems to have @noble/curves/secp256k1.
build on npm registry: latest build locally:
is it possible that build has not been pushed to NPM?