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

Error: VirtualCode id must be lowercase: scriptSetupFormat #211

Closed
linpengteng opened this issue Jun 24, 2024 · 4 comments
Closed

Error: VirtualCode id must be lowercase: scriptSetupFormat #211

linpengteng opened this issue Jun 24, 2024 · 4 comments

Comments

@linpengteng
Copy link

linpengteng commented Jun 24, 2024

When I run pnpm build:

> vue-tsc --noEmit && vite build

Error: VirtualCode id must be lowercase: scriptSetupFormat
    at verifyVirtualCode (/Users/linpengteng/Library/WorkSpaces/github/vscode/antd-templater/template-3.x/node_modules/.pnpm/@[email protected]/node_modules/@volar/language-core/index.js:230:19)
    at Object.set (/Users/linpengteng/Library/WorkSpaces/github/vscode/antd-templater/template-3.x/node_modules/.pnpm/@[email protected]/node_modules/@volar/language-core/index.js:127:29)
    at /Users/linpengteng/Library/WorkSpaces/github/vscode/antd-templater/template-3.x/node_modules/.pnpm/@[email protected]/node_modules/@volar/typescript/lib/node/proxyCreateProgram.js:76:42
    at Object.get (/Users/linpengteng/Library/WorkSpaces/github/vscode/antd-templater/template-3.x/node_modules/.pnpm/@[email protected]/node_modules/@volar/language-core/index.js:42:17)
    at /Users/linpengteng/Library/WorkSpaces/github/vscode/antd-templater/template-3.x/node_modules/.pnpm/@[email protected]/node_modules/@volar/typescript/lib/node/proxyCreateProgram.js:138:157
    at Object.fileExists (/Users/linpengteng/Library/WorkSpaces/github/vscode/antd-templater/template-3.x/node_modules/.pnpm/@[email protected]/node_modules/@volar/typescript/lib/resolveModuleName.js:24:50)
    at tryFileLookup (/Users/linpengteng/Library/WorkSpaces/github/vscode/antd-templater/template-3.x/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/tsc.js:39987:20)
    at tryFile (/Users/linpengteng/Library/WorkSpaces/github/vscode/antd-templater/template-3.x/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/tsc.js:39978:12)
    at tryExtension (/Users/linpengteng/Library/WorkSpaces/github/vscode/antd-templater/template-3.x/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/tsc.js:39971:18)
    at tryAddingExtensions (/Users/linpengteng/Library/WorkSpaces/github/vscode/antd-templater/template-3.x/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/tsc.js:39968:107)

When I globally searched for the scriptSetupFormat field, I found that it came from vue-sfc-scripts. js (@vue/language core)

image
@linpengteng
Copy link
Author

Can Error information be eliminated

@chenli1989
Copy link

@linpengteng I encountered the same problem. How did you finally solve this issue?

@linpengteng
Copy link
Author

linpengteng commented Jun 26, 2024

@chenli1989 Vuejs fixed the bug, try pnpm install

issuses -> vuejs/language-tools#4497
fix bug -> https://github.com/vuejs/language-tools/pull/4498/files

image

@linpengteng
Copy link
Author

linpengteng commented Jun 26, 2024

@chenli1989

If it still doesn't work, you can refer to the following in package.json

"pnpm": {
    "overrides": {
        "@volar/typescript": "2.3.1",
        "@volar/language-core": "2.3.1"
    }
}

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