francium-sdk icon indicating copy to clipboard operation
francium-sdk copied to clipboard

SyntaxError: Cannot use import statement outside a module

Open jaloji opened this issue 3 years ago • 0 comments

I'm not sure how to use this, I'm not familiar with node.js but when I'm trying to use your code exemple in the readfile it return me that:

`import { Connection, PublicKey } from '@solana/web3.js'; ^^^^^^

SyntaxError: Cannot use import statement outside a module ←[90m at Object.compileFunction (node:vm:352:18)←[39m ←[90m at wrapSafe (node:internal/modules/cjs/loader:1031:15)←[39m ←[90m at Module._compile (node:internal/modules/cjs/loader:1065:27)←[39m ←[90m at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)←[39m ←[90m at Module.load (node:internal/modules/cjs/loader:981:32)←[39m ←[90m at Function.Module._load (node:internal/modules/cjs/loader:822:12)←[39m ←[90m at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)←[39m ←[90m at node:internal/main/run_main_module:17:47←[39m`

jaloji avatar Dec 14 '21 02:12 jaloji