question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Running volar locally reports errors

See original GitHub issue

I want to running volar in my local envirenment, when i run

cd extensions/vscode-vue-languare-feature/
npm intall
npm run watch

but occured a lot of errors like:

➜  volar-master npm run watch

packages/vue-code-gen/src/transform.ts:1:39 - error TS2307: Cannot find module '@vue/shared' or its corresponding type declarations.

1 import { isGloballyWhitelisted } from '@vue/shared';
                                        ~~~~~~~~~~~~~

packages/vue-code-gen/src/transform.ts:2:26 - error TS2307: Cannot find module 'typescript/lib/tsserverlibrary' or its corresponding type declarations.

2 import type * as ts from 'typescript/lib/tsserverlibrary';
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

....................................

211     // @ts-expect-error
        ~~~~~~~~~~~~~~~~~~~

packages/typescript-language-service/src/services/codeAction.ts:233:5 - error TS2578: Unused '@ts-expect-error' directive.

233     // @ts-expect-error
        ~~~~~~~~~~~~~~~~~~~

packages/typescript-language-service/src/services/codeActionResolve.ts:15:3 - error TS2578: Unused '@ts-expect-error' directive.

15   // @ts-expect-error
     ~~~~~~~~~~~~~~~~~~~


Found 104 errors.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ build: `tsc -b tsconfig.build.json`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/sss/.npm/_logs/2022-05-25T11_50_34_849Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ watch: `npm run build && (npm run watch:base & npm run watch:vue-language-features & npm run watch:typescript-vue-plugin)`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ watch script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/sss/.npm/_logs/2022-05-25T11_50_34_891Z-debug.log

How to solve it please?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
IIFelixcommented, May 26, 2022

You should use the scripts in the package.json of the root folder. Don’t ‘cd’ into the extensions directory. You can just ‘pnpm run watch:vue-language-features’ in the root folder.

Tip: If you are using vscode you can just start the debug mode with ‘Launch Vue Language Features’

1reaction
xiaoxiangmoecommented, May 25, 2022

You need use pnpm

Read more comments on GitHub >

github_iconTop Results From Across the Web

@volar/transforms | Yarn - Package Manager
The recommended way to develop the volar extension is to use the Debug Tools provided by VSCode. Alternatively, you can run one of...
Read more >
LSP error with Volar and Vue files : r/neovim - Reddit
I am running into an error when opening Vue files with the Volar language server enabled and I am wondering if anyone can...
Read more >
Error when running xcp-d 1.1.3 ("list index out of range")
Hello, I have been running xcp_d on a computing cluster without any problems. However, I wanted to change my pipeline to incorporate filtering...
Read more >
Ruffle | Flash Player emulator written in the Rust programming ...
Ruffle is a Flash Player emulator written in Rust. Ruffle runs natively on all modern operating systems as a standalone application, and on...
Read more >
Customer reviews: Avertv Hybrid Volar Max TV Tuner ... - Amazon.com
If you are running the Windows 10 OS, read this review... Reviewed in the United States on August 25, 2015. I purchased this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found