antfu-collective / vite-ssg

Static site generation for Vue 3 on Vite
MIT License
1.32k stars 136 forks source link

An internal error occurred. #361

Closed sukbearai closed 1 year ago

sukbearai commented 1 year ago

Describe the bug


[vite-ssg] An internal error occurred.
[vite-ssg] Please report an issue, if none already exists: https://github.com/antfu/vite-ssg/issues
/Users/yangfan/Desktop/work/dcy-web/node_modules/.pnpm/@arco-design+web-vue@2.47.1_vue@3.3.4/node_modules/@arco-design/web-vue/es/image/style/css.js:1
import "../../style/index.css";
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at internalCompileFunction (node:internal/vm:73:18)
    at wrapSafe (node:internal/modules/cjs/loader:1176:20)
    at Module._compile (node:internal/modules/cjs/loader:1218:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:169:29)
    at ModuleJob.run (node:internal/modules/esm/module_job:194:25)

Node.js v18.15.0
 ELIFECYCLE  Command failed with exit code 1.

Reproduction

https://arco.design/vue/docs/start#%E6%8C%89%E9%9C%80%E5%8A%A0%E8%BD%BD%EF%BC%88%E6%A8%A1%E6%9D%BF%EF%BC%89

System Info

System:
    OS: macOS 13.4
    CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
    Memory: 557.13 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.15.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.7.2 - /usr/local/bin/npm
    pnpm: 8.6.4 - /usr/local/bin/pnpm
  Browsers:
    Edge: 114.0.1823.67
    Safari: 16.5

Used Package Manager

pnpm

Validations

censujiang commented 1 year ago

arco-design does not support pnpm very well, please try to switch to yarn

antfu commented 1 year ago

We temporarily close this due to the lack of enough information. Please provide a minimal reproduction to reopen the issue. Thanks.

Why reproduction is required