Closed thegouge closed 2 years ago
Hello! I cannot reproduce this so it might related to a Node<>Windows issue. Things you can try to see if it works:
node --experimental-json-modules --experimental-specifier-resolution=node ./node_modules/.bin/vite-ssr
. This would deactivate a couple of features but at least we can see if it works.I think this was due to some breaking changes in recent versions of Node and should be fixed in 0.17.4. Related: #74
Steps to Replicate the Error
I simply followed the directions from the docs with a brand new project
I then added vitedgePlugin to vite.config.js
and then I refactored my src/main.js to look like this:
I also have tried it with initializing the vue-router stuff (defining a home route, creating a home page, adding to the App.vue) but the error is the same either way
I also created the directories functions/api/index.js and functions/props/index.js (but I still get the error when the functions directory is removed)
here's my package.json:
I'm running: windows: 10 21H1 yarn 1.22.5 node: 14.17.5 npm: 7.21.0
Expected Behavior
when I run
yarn vitedge dev
oryarn vitedge dev --ssr
, a dev server is spun up, and I'm able to preview my app locallyCurrent Behavior
if I try to run:
I get:
and when I try to run it in SSR mode, I get the same error but for
vite-ssr
instead