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
TypeError [ERR_IMPORT_ASSERTION_TYPE_MISSING]: Module "file:///user/home/pontem/liquidswap-api/node_modules/@pontem/coins-registry/src/staking.json" needs an import assertion of type "json"
This issue tested in NodeJS v18.14 and above
Other platforms
On bun v1.26 platform the package works fine with and without assertion
Didn't test on Deno
Solution:
in the index.js file, please add assertion with type 'json'
Example
/**
* Known coins
*/
import coins from './coins.json' assert { type: 'json' };
/**
* Known pools
*/
import pools from './pools.json' assert { type: 'json' };
/**
* Known staking pools
*/
import staking from './staking.json' assert { type: 'json' };
Description
This issue tested in NodeJS v18.14 and above
Other platforms
On bun v1.26 platform the package works fine with and without assertion
Didn't test on Deno
Solution:
in the index.js file, please add assertion with type 'json'
Example
Resource
V8 blog
The text was updated successfully, but these errors were encountered: