-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
Description
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' };
Resource
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels