solid-form-handler doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module
Closed this issue · 1 comments
docgecko commented
I have the following error in a astro/solidjs app:
solid-form-handler doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix. (x2)
(node:48442) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
error Cannot use import statement outside a module
/Users/docgecko/Code/floreer/floreer-astro-sanity/astro/node_modules/solid-form-handler/index.es.js:20
import { reach, ValidationError as ValidationError$1 } from "yup";
^^^^^^
SyntaxError: Cannot use import statement outside a module
at wrapSafe (internal/modules/cjs/loader.js:1001:16)
at Module._compile (internal/modules/cjs/loader.js:1049:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at ModuleWrap.<anonymous> (internal/modules/esm/translators.js:199:29)
at ModuleJob.run (internal/modules/esm/module_job.js:183:25)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Loader.import (internal/modules/esm/loader.js:178:24)
webblocksapp commented
Fixed with release v1.0.0-alpha.6