Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build Vitesse Project using vite-ssg #395

Open
5 tasks done
dennisaga opened this issue Jul 19, 2022 · 1 comment
Open
5 tasks done

Unable to build Vitesse Project using vite-ssg #395

dennisaga opened this issue Jul 19, 2022 · 1 comment

Comments

@dennisaga
Copy link

dennisaga commented Jul 19, 2022

Describe the bug

Don't why it showing error when on building time.

`vite v2.9.13 building SSR bundle for production...
transforming (44) src/store/user.ts"$" is imported from external module "vue/macros" but never used in "src/components/Header.vue".
✓ 45 modules transformed.
.vite-ssg-temp/manifest.webmanifest 0.38 KiB
.vite-ssg-temp/main.mjs 140.01 KiB
.vite-ssg-temp/assets/style.6db5148f.css 77.52 KiB

[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/errors:477
ErrorCaptureStackTrace(err);
^

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /home/denny/Code/sdk-web/node_modules/.pnpm/vue@3.2.37/node_modules/vue/macros.d.ts
at new NodeError (node:internal/errors:388:5)
at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:80:11)
at defaultGetFormat (node:internal/modules/esm/get_format:122:38)
at defaultLoad (node:internal/modules/esm/load:21:20)
at ESMLoader.load (node:internal/modules/esm/loader:431:26)
at ESMLoader.moduleProvider (node:internal/modules/esm/loader:350:22)
at new ModuleJob (node:internal/modules/esm/module_job:66:26)
at #createModuleJob (node:internal/modules/esm/loader:369:17)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:328:34)
at async ModuleWrap. (node:internal/modules/esm/module_job:82:21) {
code: 'ERR_UNKNOWN_FILE_EXTENSION'
}`

there is no error in header component

Reproduction

https://github.com/dennisaga/vite-ssg-build-error-bug

System Info

System:
    OS: Linux 5.10 Ubuntu 20.04.3 LTS (Focal Fossa)
    CPU: (8) x64 Intel(R) Core(TM) i5-10300H CPU @ 2.50GHz
    Memory: 8.65 GB / 11.61 GB
    Container: Yes
    Shell: 5.8 - /usr/bin/zsh
  Binaries:
    Node: 18.5.0 - /usr/bin/node
    Yarn: 1.22.19 - /usr/bin/yarn
    npm: 8.12.1 - /usr/bin/npm

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
@compilekaiten
Copy link

Adding onto this, I'm experiencing a similar error. While the build command doesn't fail, I'm curious if anyone knows how to remove these errors.

[vite-ssg] Build for server...
vite v3.1.0 building SSR bundle for production...
transforming (68) node_modules\.pnpm\swiper@8.3.2\node_modules\swiper\modules\pagination\pagination.min.cssError when using sourcemap for reporting an error: Can't resolve original location of error.
Non-existent export '$' is imported from node_modules/.pnpm/vue@3.2.38/node_modules/vue/macros.d.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants