nwolverson / vscode-language-purescript

PureScript Language Support for Visual Studio Code
https://marketplace.visualstudio.com/items/nwolverson.language-purescript
Other
17 stars 12 forks source link

[BUGFIX] Invalid 'reference' directive (update) #17

Closed andys8 closed 3 years ago

andys8 commented 3 years ago

Issue

~/tmp-vsix/vscode-language-purescript(master*) » vsce package                                              
Executing prepublish script 'npm run vscode:prepublish'...
> language-purescript@0.2.3 vscode:prepublish
> tsc -p ./
node_modules/@types/node/index.d.ts:20:1 - error TS1084: Invalid 'reference' directive syntax.
20 /// <reference lib="es2015" />
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! code 2
npm ERR! path /home/coder/tmp-vsix/vscode-language-purescript
npm ERR! command failed
npm ERR! command sh -c tsc -p ./
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/coder/.npm/_logs/2021-02-27T13_41_54_551Z-debug.log
 ERROR  npm failed with exit code 2

Solution

See https://stackoverflow.com/a/63722468

But: I chose the @types/node version that was referenced, that is working. The version can actually be bumped to a newer version. I don't know the target version or node versions in use. Feel free to reject and bump to another version.

nwolverson commented 3 years ago

Hmm, wonder why I never experienced that issue, the typescript version is pinned.

Do we actually needs @types/node, I don't see where that is used

andys8 commented 3 years ago

Good point. I did only search for the issue and how to fix it. Didn't notice this repository doesn't contain that much code and it looks like the dependency isn't used. See #18