How to resolve module specifier "vue"

I created a new page in cloudflare by connecting my github repo.
And then I was successfully deploy the repo, but the website deployed doesn’t work.
If I open the preview link, it doesn’t show nothing just shows blank screen and the dev tool has a console error below.

Uncaught TypeError: Failed to resolve module specifier "vue". Relative references must start with either "/", "./", or "../".

The website is based on Vue 3 + Vite.
I started the website by using Vite.

npm create vite@latest my-vue-app -- --template vue

After some research by myself, I tried to remove the createApp line in the main.js file like an answer from stackoverflow, but it didn’t work at all.

How can I resolve that issue?

I also tried to replace the output folder in the settings like dist, but I am getting another issue after that.

11:21:56.527	Error: Output directory "dist" not found.
11:21:57.483	Failed: build output directory not found

You don’t have a build command, it isn’t building the site. You’ll need to one for Vue, there’s probably a preset for it.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.