You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently import of @solana/web3.js will result in a console.warn of: bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)
This is due to rollup bundling the bigint-buffer package from the @solana/buffer-layout-utils dependency. bigint-buffer has a native module which it attempts to import:
if(!process.browser){try{converter=require('bindings')('bigint_buffer');}catch(e){console.warn('bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)');}}
The problem is that the above code relies on the native module existing in the correct location in the package it is run in. Since rollup bundles the require into @solana/web3.js the native module will never exist and will always result in the warning.
Proposed Solution
bigint-buffer can be added to the list of dependencies prevented from bundling in rollup.config.js.
The text was updated successfully, but these errors were encountered:
Problem
Currently import of
@solana/web3.js
will result in aconsole.warn
of:bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)
This is due to rollup bundling the
bigint-buffer
package from the@solana/buffer-layout-utils
dependency.bigint-buffer
has a native module which it attempts to import:The problem is that the above code relies on the native module existing in the correct location in the package it is run in. Since rollup bundles the
require
into@solana/web3.js
the native module will never exist and will always result in the warning.Proposed Solution
bigint-buffer
can be added to the list of dependencies prevented from bundling inrollup.config.js
.The text was updated successfully, but these errors were encountered: