I've been trying to statically generate pages with getStaticProps and getStaticPaths, but the dev server crashes whenever I try to import fs; production builds work just fine.
❱ yarn start
yarn run v1.22.10
warning package.json: No license field
$ microsite
[snowpack] ! building dependencies...
~/snowpack/esinstall/lib/entrypoints.js:168
throw new Error(`Package "${dep}" not found. Have you installed it? ${depManifestLoc ? depManifestLoc : ''}`);
^
Error: Package "fs" not found. Have you installed it?
at Object.resolveEntrypoint (~/snowpack/esinstall/lib/entrypoints.js:168:15)
at resolveWebDependency (~/snowpack/esinstall/lib/index.js:89:31)
at Object.install (~/snowpack/esinstall/lib/index.js:203:36)
at Object.run (~/snowpack/snowpack/lib/sources/local-install.js:43:43)
at installDependencies (~/snowpack/snowpack/lib/sources/local.js:54:49)
at async Object.prepare (~/snowpack/snowpack/lib/sources/local.js:109:35)
at async startServer (~/snowpack/snowpack/lib/commands/dev.js:278:27)
at async dev (file://~/microsite/examples/root/node_modules/microsite/dist/cli/microsite-dev.js:57:22)
I've tested this with the latest SHA of both microsite@1.1.0 and snowpack, and get the same result. You should be able to repro by running npm start in this example project: ./examples/root
I've been trying to statically generate pages with
getStaticProps
andgetStaticPaths
, but the dev server crashes whenever I try to importfs
; production builds work just fine.I've tested this with the latest SHA of both microsite@1.1.0 and snowpack, and get the same result. You should be able to repro by running
npm start
in this example project: ./examples/root