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

building error #93

Closed
XavierXuV5 opened this issue Oct 24, 2024 · 1 comment
Closed

building error #93

XavierXuV5 opened this issue Oct 24, 2024 · 1 comment

Comments

@XavierXuV5
Copy link

base info:
os: Windows 10 10.0.19045
node: 20.12.2
packageManager: pnpm
dependencies info:

{
  "name": "learn.nuxt.com",
  "type": "module",
  "private": true,
  "packageManager": "[email protected]",
  "scripts": {
    "build": "nuxt build",
    "dev": "nuxt dev",
    "generate": "nuxt generate",
    "preview": "nuxt preview",
    "typecheck": "nuxt typecheck",
    "prepare": "nuxt prepare && pnpm -C ./templates/basic install && pnpm -C ./templates/basic prepare",
    "lint": "eslint .",
    "format": "eslint . --fix",
    "textlint": "textlint --format pretty-error content/**"
  },
  "dependencies": {
    "@shikijs/core": "^1.14.1",
    "@shikijs/monaco": "^1.14.1",
    "@volar/monaco": "~2.4.0",
    "@vue/language-service": "^2.0.29",
    "@webcontainer/api": "^1.2.0",
    "@xterm/addon-fit": "^0.10.0",
    "@xterm/xterm": "^5.5.0",
    "birpc": "^0.2.17",
    "floating-vue": "^5.2.2",
    "jszip": "^3.10.1",
    "monaco-editor": "^0.50.0",
    "shiki": "^1.14.1",
    "splitpanes": "^3.1.5",
    "strip-json-comments": "^5.0.1",
    "textlint": "^14.0.4",
    "textlint-rule-preset-vuejs-jp": "github:vuejs-jp/textlint-rule-preset-vuejs-jp",
    "theme-vitesse": "^0.8.3",
    "unified": "^11.0.5",
    "vscode-uri": "^3.0.8",
    "vue": "^3.4.38",
    "vue-router": "^4.4.3"
  },
  "devDependencies": {
    "@antfu/eslint-config": "^2.26.0",
    "@iconify-json/catppuccin": "^1.1.4",
    "@iconify-json/logos": "^1.1.44",
    "@iconify-json/ph": "^1.1.14",
    "@iconify-json/svg-spinners": "^1.1.3",
    "@nuxt/content": "^2.13.2",
    "@nuxt/devtools": "^1.3.14",
    "@nuxt/eslint": "^0.5.1",
    "@nuxt/icon": "^1.4.7",
    "@nuxt/image": "^1.7.0",
    "@nuxt/kit": "^3.12.4",
    "@nuxthub/core": "^0.7.14",
    "@nuxtjs/color-mode": "^3.4.4",
    "@nuxtjs/seo": "2.0.0-rc.10",
    "@pinia/nuxt": "^0.5.3",
    "@unocss/eslint-plugin": "^0.62.2",
    "@unocss/extractor-mdc": "^0.62.2",
    "@unocss/nuxt": "^0.62.2",
    "@vueuse/nuxt": "^11.0.1",
    "eslint": "^9.9.0",
    "eslint-plugin-format": "^0.1.2",
    "execa": "^9.3.1",
    "fast-glob": "^3.3.2",
    "fuse.js": "^7.0.0",
    "monaco-editor-core": "^0.50.0",
    "nuxt": "^3.12.4",
    "pathe": "^1.1.2",
    "remark-external-links": "^9.0.1",
    "typescript": "^5.5.4",
    "vue-tsc": "^2.0.29"
  },
  "pnpm": {
    "patchedDependencies": {
      "[email protected]": "patches/[email protected]"
    }
  }
}
pnpm run build
Nuxt 3.13.2 with Nitro 2.9.7                                                                                                                                                         15:17:23
i Building client...                                                                                                                                                                 15:17:44
i vite v5.4.9 building for production...                                                                                                                                             15:17:45
node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@nuxt/content/dist/runtime/components/ContentNavigation.vue (9:65): Error when using sourcemap for reporting an error: Can't resolve original location of error.
i ✓ 136 modules transformed.                                                                                                                                                         15:17:47

 ERROR  x Build failed in 1.62s                                                                                                                                                      15:17:47


[15:17:47]  ERROR  Nuxt Build Error: node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@nuxt/content/dist/runtime/components/ContentNavigation.vue (9:65): Bad character escape sequence, expected 4 hex characters (Note that you need plugins to import files that are not JavaScript)
file: C:/Users/FrontEnd-XuHang/Documents/Projects/user_project/learn.nuxt.com/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@nuxt/content/dist/runtime/components/ContentNavigation.vue:9:65

 7: import { useContent } from 'C:/Users/FrontEnd-XuHang/Documents/Projects/user_project/learn.nuxt.com/node_modules/.pnp...
 8:
 9: import NuxtLink from 'C:\Users\FrontEnd-XuHang\Documents\Projects\user_project\learn.nuxt.com\components\CustomNuxtLi...
                                                                     ^
10: const ContentNavigation = defineComponent({
11:   name: "ContentNavigation",


@XavierXuV5
Copy link
Author

comment this code

path: modules/nuxt-link.ts
import { defineNuxtModule } from '@nuxt/kit'

export default defineNuxtModule({
  meta: {
    name: 'custom-nuxt-link',
  },
  setup(_, nuxt) {
    // We replace the NuxtLink component with our own
    /* nuxt.hook('components:extend', (components) => {
      const NuxtLink = components.find(c => c.pascalName === 'NuxtLink')!
      const path = fileURLToPath(new URL('../components/CustomNuxtLink.ts', import.meta.url))
      NuxtLink.shortPath = path
      NuxtLink.filePath = path
    }) */
  },
})

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

1 participant