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

lsp-sample npm run compile error #38

Closed
Catlite91 opened this issue Nov 9, 2017 · 4 comments
Closed

lsp-sample npm run compile error #38

Catlite91 opened this issue Nov 9, 2017 · 4 comments
Assignees

Comments

@Catlite91
Copy link

Catlite91 commented Nov 9, 2017

node version: 8.3.0
npm run compile error:
➜ lsp-sample git:(master) ✗ npm run compile

lsp--sample@0.0.1 compile /Users/panda/workspace/dianwoda/framework-vscode-extension/framework-intellisense/example/lsp-sample
tsc -p client/tsconfig.json && cd server && npm run installServer && cd .. && tsc -p server/tsconfig.json

lsp-sample@0.0.1 installServer /Users/panda/workspace/dianwoda/framework-vscode-extension/framework-intellisense/example/lsp-sample/server
installServerIntoExtension ../client ./package.json ./tsconfig.json

Copying package.json to extension's server location...
Updating server npm modules into extension's server location...
server/src/server.ts(25,5): error TS6133: 'workspaceRoot' is declared but its value is never read.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! lsp--sample@0.0.1 compile: tsc -p client/tsconfig.json && cd server && npm run installServer && cd .. && tsc -p server/tsconfig.json
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the lsp--sample@0.0.1 compile 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/panda/.npm/_logs/2017-11-09T14_58_14_572Z-debug.log

@hessellund
Copy link

Hi @Catlite91 , I am also getting this error. How did you resolve it? I can see you closed the issue again...?

@Catlite91
Copy link
Author

I just run the compile script in the package.json file manually
tsc -p client/tsconfig.json && cd server && npm run installServer && cd .. && tsc -p server/tsconfig.json
be sure you'v installed the tsc -g

@hessellund
Copy link

Hmmm, it still fails for me. I changed the server/tsconfig.json option noUnusedLocals from true to false and that did the trick. I am running tsc version 2.6.1

@pascalpoizat
Copy link

pascalpoizat commented Dec 8, 2017

Hello

The solution proposed by @Catlite91 does not work for me.

I get:

tsc -p client/tsconfig.json && cd server && npm run installServer && cd .. && tsc -p server/tsconfig.json

> lsp-sample@0.0.1 installServer /Users/pascalpoizat/Documents/Code/vscode-extension-samples/lsp-sample/server
> installServerIntoExtension ../client ./package.json ./tsconfig.json

Copying package.json to extension's server location...
Updating server npm modules into extension's server location...
server/src/server.ts(25,5): error TS6133: 'workspaceRoot' is declared but its value is never read.

tsc 2.6.2

After doing the change proposed by @hessellund then it works and npm run compile also works.

Thanks to you both.

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

4 participants