maticnetwork / matic.js

Javascript developer library to interact with Matic Network
https://wiki.polygon.technology/docs/tools/matic-js/get-started/
MIT License
542 stars 262 forks source link

npm.export.js is pointing to missing matic.node.js files #438

Open cromaniuc opened 1 month ago

cromaniuc commented 1 month ago

Describe the bug

The Matic.js library uses an npm.export.js file to specify which parts of the library are exported for use when it's included as a dependency. However, there is an issue with this file in the past releases that causes runtime errors when the library is loaded.

At runtime, when the library is loaded using the npm.export.js file, it fails with the following error:

Error: Cannot find module './matic.node.js'
Require stack:

/.../node_modules/@maticnetwork/maticjs/dist/npm.export.js
/.../node_modules/@maticnetwork/maticjs-web3/dist/matic-web3.node.js
/.../node_modules/@maticnetwork/maticjs-web3/dist/npm.export.js

Hint

This issue occurs because, during the library's build and packaging process, the npm.export.js file is not included in the release with the correct content.