antfu / vite-ssg

Static site generation for Vue 3 on Vite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can not find XXX\.vite-ssg-temp\main.cjs'

peterroe opened this issue · comments

commented

When I run build.

The terminal is report such errror. It can't find one file and I am build fail, too. But I found that this file exists!

Why does it report the error?

[vite-ssg] An internal error occurred.
[vite-ssg] Please report an issue, if none already exists: https://github.com/antfu/vite-ssg/issues
node:internal/modules/cjs/loader:933
  const err = new Error(message);
              ^

Error: Cannot find module 'file:\D:\VscodeItems\antfu.me\.vite-ssg-temp\main.cjs'  # it say can't find this file
Require stack:
- D:\VscodeItems\antfu.me\node_modules\.pnpm\vite-ssg@0.17.2_6acdbf34162ba7e10d9a1c150af90728\node_modules\vite-ssg\dist\node\cli.mjs
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at build (file:///D:/VscodeItems/antfu.me/node_modules/.pnpm/vite-ssg@0.17.2_6acdbf34162ba7e10d9a1c150af90728/node_modules/vite-ssg/dist/node/cli.mjs:185:77)        -ssg/dist/node/cli.mjs:185:77)                                                                                                     de_modules/vite-ssg/dist/node/cli.mjs:
    at async Object.handler (file:///D:/VscodeItems/antfu.me/node_modules/.pnpm/vite-ssg@0.17.2_6acdbf34162ba7e10d9a1c150af90728/node_modules/vite-ssg/dist/node/cli.mjs:298:3) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [                                                                                                                  \\node\\cli.mjs'
    'D:\\VscodeItems\\antfu.me\\node_modules\\.pnpm\\vite-ssg@0.17.2_6acdbf34162ba7e10d9a1c150af90728\\node_modules\\vite-ssg\\dist\\node\\cli.mjs'
  ]
}
commented

upgrade lastest