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
when I hit this error when running node --es-module-specifier-resolution=node myscript.js
/usr/src/packages/provider/packages/contract/node_modules/redspot/internal/context.js:32
throw new errors_1.RedspotError(errors_list_1.ERRORS.GENERAL.CONTEXT_NOT_CREATED);
^
RedspotError: RS5: RedspotContext is not created.
at Function.getRedspotContext (/usr/src/packages/provider/packages/contract/node_modules/redspot/internal/context.js:32:19)
at extendEnvironment (/usr/src/packages/provider/packages/contract/node_modules/redspot/internal/core/config/config-env.js:60:42)
at Object.<anonymous> (/usr/src/packages/provider/packages/contract/node_modules/@redspot/patract/index.js:13:32)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:168:29)
at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
at async Promise.all (index 0) {
parent: undefined,
errorDescriptor: {
number: 5,
message: 'RedspotContext is not created.',
title: "Redspot wasn't initialized",
description: 'Redspot initialization failed. This is a bug.\n' +
'\n' +
'Please [report it](https://github.com/nomiclabs/redspot/issues/new) to help us improve Redspot.',
shouldBeReported: true
},
number: 5,
messageArguments: {},
_isRedspotError: true
}
If I change to
import{network,patract}from'redspot'
I get different errors about redspot being commonjs
import { network, patract } from 'redspot';
^^^^^^^
SyntaxError: Named export'network' not found. The requested module 'redspot' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'redspot';
const { network, patract } = pkg;
at ModuleJob._instantiate (node:internal/modules/esm/module_job:127:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:191:5)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:337:24)
at async loadESM (node:internal/process/esm_loader:88:5)
at async handleMainPromise (node:internal/modules/run_main:61:12)
How can I import redspot into my project?
The text was updated successfully, but these errors were encountered:
Redspot Version
0.13.6
My project is a
module
compiling toesnext
.I am trying to import redspot using
when I hit this error when running
node --es-module-specifier-resolution=node myscript.js
If I change to
I get different errors about redspot being commonjs
How can I import redspot into my project?
The text was updated successfully, but these errors were encountered: