I’m following along in the “Ten Days of Blockchain” demo to which “meowking” referred me, and I’m running into a problem with “Day 2”:
When I try to run the “Day 2” version, I get a JavaScript error on the very first import in index.mjs:
import { loadStdLib } from '@reach-sh/stdlib';
gives me:
file:///app/index.mjs:1
import { loadStdLib } from '@reach-sh/stdlib';
^^^^^^^^^^
SyntaxError: Named export 'loadStdLib' not found. The requested module '@reach-sh/stdlib' 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 '@reach-sh/stdlib';
const { loadStdLib } = pkg;
at ModuleJob._instantiate (internal/modules/esm/module_job.js:104:21)
at async ModuleJob.run (internal/modules/esm/module_job.js:149:5)
at async Loader.import (internal/modules/esm/loader.js:177:24)
at async Object.loadESM (internal/process/esm_loader.js:68:5)
I do recall seeing and dismissing a message of some sort about “accessing a network drive.”
Anybody here have idea what went wrong?
(Cross-posted to the “Days of Blockchain” discussion on Discord, but Discord just went unresponsive on me.)
****** Additional information:
I will note that according to 3 separate “find” commands issued from a sudo’d command line on my Mac there is nothing in the local file system called “@reach-sh” or “stdlib,” nor anything with a “.mjs” extension that’s even remotely close to “ETH.mjs,” “ALGO.mjs,” or “loader.mjs.” Nor does there appear to be an “npm” command.