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
import { CID } from 'multiformats';
async function main() {
console.log(CID.parse('QmaozNR7DZHQK1ZcU9p7QdrshMvXqWK6gpu5rmrkPdT3L4'));
}
main().catch((error) => {
console.error(error);
process.exitCode = 1;
});
Getting:
Error: No "exports" main defined in /home/dag-json-demo/node_modules/multiformats/package.json
at exportsNotFound (node:internal/modules/esm/resolve:304:10)
at packageExportsResolve (node:internal/modules/esm/resolve:594:13)
at resolveExports (node:internal/modules/cjs/loader:590:36)
at Function.Module._findPath (node:internal/modules/cjs/loader:667:31)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1129:27)
at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/home/dag-json-demo/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
at Function.Module._load (node:internal/modules/cjs/loader:984:27)
at Module.require (node:internal/modules/cjs/loader:1231:19)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> (/home//dag-json-demo/scripts/demo/dag-json.ts:1:1) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
Minimal sample with import:
Getting:
Expected behavior:
Import CID
Environment:
tsconfig.json
The same result with
tsconfig.json
The text was updated successfully, but these errors were encountered: