bmatcuk / stylelint-lsp

A stylelint Language Server
MIT License
46 stars 4 forks source link

Do not import TS helpers implicitly #15

Closed Gelio closed 3 years ago

Gelio commented 3 years ago

Disable importHelpers in tsconfig. This removes the implicit use of tslib in the final binary. tslib was implicitly used, but not required explicitly, which caused errors when trying to use the library without installing tslib alongside it.

With this commit, dist/index.js does not have a require('tslib'), which allows using the library without having to install tslib alongside it.

This fixes #14.

The problem only appeared when the packages are installed with the --production flag.

Verification

Use the following command to verify that tslib is no longer required:

rm dist node_modules -rf && npm i; rm node_modules -rf && npm i --production && node dist/index.js

The vital step here is removing node_modules and reinstalling it with --production. The first npm i is just to get the package built. Using yarn instead of npm should surface the bug too.

Logs without this commit ``` 10:30 $ rm dist node_modules -rf && npm i; rm node_modules -rf && npm i --production && node dist/index.js > husky@4.2.5 install /home/grzegorz/projects/open-source/stylelint-lsp/node_modules/husky > node husky install husky > Setting up git hooks husky > Done > husky@4.2.5 postinstall /home/grzegorz/projects/open-source/stylelint-lsp/node_modules/husky > opencollective-postinstall || exit 0 Thank you for using husky! If you rely on this package, please consider supporting our open collective: > https://opencollective.com/husky/donate > stylelint-lsp@1.2.0 prepare /home/grzegorz/projects/open-source/stylelint-lsp > run-s clean build > stylelint-lsp@1.2.0 clean /home/grzegorz/projects/open-source/stylelint-lsp > rimraf dist > stylelint-lsp@1.2.0 build /home/grzegorz/projects/open-source/stylelint-lsp > tsc -p tsconfig.build.json node_modules/vscode-languageserver/lib/callHierarchy.proposed.d.ts:5:58 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'CallHierarchyPrepareParams'. 5 onPrepare(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/callHierarchy.proposed.d.ts:5:95 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'CallHierarchyItem'. 5 onPrepare(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/callHierarchy.proposed.d.ts:6:64 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'CallHierarchyIncomingCallsParams'. 6 onIncomingCalls(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/callHierarchy.proposed.d.ts:6:107 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'CallHierarchyIncomingCall'. 6 onIncomingCalls(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/callHierarchy.proposed.d.ts:6:152 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'CallHierarchyIncomingCall'. 6 onIncomingCalls(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/callHierarchy.proposed.d.ts:7:64 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'CallHierarchyOutgoingCallsParams'. 7 onOutgoingCalls(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/callHierarchy.proposed.d.ts:7:107 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'CallHierarchyOutgoingCall'. 7 onOutgoingCalls(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/callHierarchy.proposed.d.ts:7:152 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'CallHierarchyOutgoingCall'. 7 onOutgoingCalls(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:3:557 - error TS2305: Module '"../../vscode-languageserver-protocol/lib/common/api"' has no exported member 'RPCMessageType'. 3 import { TextDocumentContentChangeEvent, TextDocumentSaveReason, Location, Command, TextEdit, WorkspaceEdit, CompletionItem, CompletionList, Hover, SignatureHelp, Definition, DocumentHighlight, SymbolInformation, DocumentSymbol, WorkspaceSymbolParams, DocumentSymbolParams, CodeLens, DocumentLink, Range, RequestType, RequestType0, RequestHandler, RequestHandler0, GenericRequestHandler, StarRequestHandler, HandlerResult, NotificationType, NotificationType0, NotificationHandler, NotificationHandler0, GenericNotificationHandler, StarNotificationHandler, RPCMessageType, MessageReader, MessageWriter, CancellationToken, Disposable, Event, ConnectionStrategy, InitializeParams, InitializeResult, InitializeError, InitializedParams, MessageActionItem, DidChangeConfigurationParams, DidOpenTextDocumentParams, DidChangeTextDocumentParams, DidCloseTextDocumentParams, DidSaveTextDocumentParams, WillSaveTextDocumentParams, DidChangeWatchedFilesParams, PublishDiagnosticsParams, CompletionParams, ReferenceParams, CodeActionParams, CodeLensParams, DocumentFormattingParams, DocumentRangeFormattingParams, DocumentOnTypeFormattingParams, RenameParams, DocumentLinkParams, ExecuteCommandParams, ApplyWorkspaceEditParams, ApplyWorkspaceEditResponse, ClientCapabilities, ServerCapabilities, DocumentColorParams, ColorInformation, ColorPresentationParams, ColorPresentation, CodeAction, FoldingRangeParams, FoldingRange, Declaration, DeclarationLink, DefinitionLink, SelectionRange, SelectionRangeParams, ProgressType, HoverParams, SignatureHelpParams, DefinitionParams, DocumentHighlightParams, PrepareRenameParams, DeclarationParams, TypeDefinitionParams, ImplementationParams, WorkDoneProgressParams, PartialResultParams } from 'vscode-languageserver-protocol'; ~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:260:19 - error TS2315: Type 'NotificationType0' is not generic. 260 add(type: NotificationType0, registerParams: RO): void; ~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:261:22 - error TS2314: Generic type 'NotificationType

' requires 1 type argument(s). 261 add(type: NotificationType, registerParams: RO): void; ~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:267:25 - error TS2314: Generic type 'RequestType0' requires 2 type argument(s). 267 add(type: RequestType0, registerParams: RO): void; ~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:268:28 - error TS2314: Generic type 'RequestType' requires 3 type argument(s). 268 add(type: RequestType, registerParams: RO): void; ~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:304:24 - error TS2315: Type 'NotificationType0' is not generic. 304 register(type: NotificationType0, registerParams?: RO): Promise; ~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:305:27 - error TS2314: Generic type 'NotificationType

' requires 1 type argument(s). 305 register(type: NotificationType, registerParams?: RO): Promise; ~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:313:61 - error TS2315: Type 'NotificationType0' is not generic. 313 register(unregisteration: BulkUnregistration, type: NotificationType0, registerParams?: RO): Promise; ~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:314:64 - error TS2314: Generic type 'NotificationType

' requires 1 type argument(s). 314 register(unregisteration: BulkUnregistration, type: NotificationType, registerParams?: RO): Promise; ~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:321:30 - error TS2314: Generic type 'RequestType0' requires 2 type argument(s). 321 register(type: RequestType0, registerParams?: RO): Promise; ~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:322:33 - error TS2314: Generic type 'RequestType' requires 3 type argument(s). 322 register(type: RequestType, registerParams?: RO): Promise; ~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:330:67 - error TS2314: Generic type 'RequestType0' requires 2 type argument(s). 330 register(unregisteration: BulkUnregistration, type: RequestType0, registerParams?: RO): Promise; ~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:331:70 - error TS2314: Generic type 'RequestType' requires 3 type argument(s). 331 register(unregisteration: BulkUnregistration, type: RequestType, registerParams?: RO): Promise; ~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:418:31 - error TS2314: Generic type 'RequestType0' requires 2 type argument(s). 418 onRequest(type: RequestType0, handler: RequestHandler0): void; ~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:419:34 - error TS2314: Generic type 'RequestType' requires 3 type argument(s). 419 onRequest(type: RequestType, handler: RequestHandler): void; ~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:439:33 - error TS2314: Generic type 'RequestType0' requires 2 type argument(s). 439 sendRequest(type: RequestType0, token?: CancellationToken): Promise; ~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:440:36 - error TS2314: Generic type 'RequestType' requires 3 type argument(s). 440 sendRequest(type: RequestType, params: P, token?: CancellationToken): Promise; ~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:455:30 - error TS2315: Type 'NotificationType0' is not generic. 455 onNotification(type: NotificationType0, handler: NotificationHandler0): void; ~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:456:33 - error TS2314: Generic type 'NotificationType

' requires 1 type argument(s). 456 onNotification(type: NotificationType, handler: NotificationHandler

): void; ~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:476:32 - error TS2315: Type 'NotificationType0' is not generic. 476 sendNotification(type: NotificationType0): void; ~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:477:35 - error TS2314: Generic type 'NotificationType

' requires 1 type argument(s). 477 sendNotification(type: NotificationType, params: P): void; ~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/sematicTokens.proposed.d.ts:5:51 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'SemanticTokensParams'. 5 on(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/sematicTokens.proposed.d.ts:5:82 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'SemanticTokens'. 5 on(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/sematicTokens.proposed.d.ts:5:107 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'SemanticTokensPartialResult'. 5 on(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/sematicTokens.proposed.d.ts:6:56 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'SemanticTokensEditsParams'. 6 onEdits(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/sematicTokens.proposed.d.ts:6:92 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'SemanticTokensEdits'. 6 onEdits(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/sematicTokens.proposed.d.ts:6:123 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'SemanticTokens'. 6 onEdits(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/sematicTokens.proposed.d.ts:6:148 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'SemanticTokensEditsPartialResult'. 6 onEdits(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/sematicTokens.proposed.d.ts:6:192 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'SemanticTokensEditsPartialResult'. 6 onEdits(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/sematicTokens.proposed.d.ts:7:56 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'SemanticTokensRangeParams'. 7 onRange(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/sematicTokens.proposed.d.ts:7:92 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'SemanticTokens'. 7 onRange(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/sematicTokens.proposed.d.ts:7:117 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'SemanticTokensPartialResult'. 7 onRange(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/sematicTokens.proposed.d.ts:23:23 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'SemanticTokens'. 23 build(): Proposed.SemanticTokens; ~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/sematicTokens.proposed.d.ts:25:28 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'SemanticTokens'. 25 buildEdits(): Proposed.SemanticTokens | Proposed.SemanticTokensEdits; ~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/sematicTokens.proposed.d.ts:25:54 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'SemanticTokensEdits'. 25 buildEdits(): Proposed.SemanticTokens | Proposed.SemanticTokensEdits; ~~~~~~~~~~~~~~~~~~~ src/buffered-message-queue.ts:9:3 - error TS2459: Module '"../node_modules/vscode-languageserver/lib/main"' declares 'RPCMessageType' locally, but it is not exported. 9 RPCMessageType, ~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:3:557 3 import { TextDocumentContentChangeEvent, TextDocumentSaveReason, Location, Command, TextEdit, WorkspaceEdit, CompletionItem, CompletionList, Hover, SignatureHelp, Definition, DocumentHighlight, SymbolInformation, DocumentSymbol, WorkspaceSymbolParams, DocumentSymbolParams, CodeLens, DocumentLink, Range, RequestType, RequestType0, RequestHandler, RequestHandler0, GenericRequestHandler, StarRequestHandler, HandlerResult, NotificationType, NotificationType0, NotificationHandler, NotificationHandler0, GenericNotificationHandler, StarNotificationHandler, RPCMessageType, MessageReader, MessageWriter, CancellationToken, Disposable, Event, ConnectionStrategy, InitializeParams, InitializeResult, InitializeError, InitializedParams, MessageActionItem, DidChangeConfigurationParams, DidOpenTextDocumentParams, DidChangeTextDocumentParams, DidCloseTextDocumentParams, DidSaveTextDocumentParams, WillSaveTextDocumentParams, DidChangeWatchedFilesParams, PublishDiagnosticsParams, CompletionParams, ReferenceParams, CodeActionParams, CodeLensParams, DocumentFormattingParams, DocumentRangeFormattingParams, DocumentOnTypeFormattingParams, RenameParams, DocumentLinkParams, ExecuteCommandParams, ApplyWorkspaceEditParams, ApplyWorkspaceEditResponse, ClientCapabilities, ServerCapabilities, DocumentColorParams, ColorInformation, ColorPresentationParams, ColorPresentation, CodeAction, FoldingRangeParams, FoldingRange, Declaration, DeclarationLink, DefinitionLink, SelectionRange, SelectionRangeParams, ProgressType, HoverParams, SignatureHelpParams, DefinitionParams, DocumentHighlightParams, PrepareRenameParams, DeclarationParams, TypeDefinitionParams, ImplementationParams, WorkDoneProgressParams, PartialResultParams } from 'vscode-languageserver-protocol'; ~~~~~~~~~~~~~~ 'RPCMessageType' is declared here. src/buffered-message-queue.ts:145:11 - error TS2314: Generic type 'RequestType' requires 3 type argument(s). 145 type: RequestType, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/buffered-message-queue.ts:150:38 - error TS7006: Parameter 'param' implicitly has an 'any' type. 150 this.connection.onRequest(type, (param, token) => { ~~~~~ src/buffered-message-queue.ts:150:45 - error TS7006: Parameter 'token' implicitly has an 'any' type. 150 this.connection.onRequest(type, (param, token) => { ~~~~~ src/buffered-message-queue.ts:181:11 - error TS2314: Generic type 'NotificationType

' requires 1 type argument(s). 181 type: NotificationType, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/buffered-message-queue.ts:186:42 - error TS7006: Parameter 'param' implicitly has an 'any' type. 186 this.connection.onNotification(type, param => { ~~~~~ src/buffered-message-queue.ts:204:11 - error TS2314: Generic type 'NotificationType

' requires 1 type argument(s). 204 type: NotificationType, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/buffered-message-queue.ts:244:24 - error TS2339: Property 'RequestCancelled' does not exist on type 'typeof ErrorCodes'. 244 ErrorCodes.RequestCancelled, ~~~~~~~~~~~~~~~~ src/buffered-message-queue.ts:264:24 - error TS2339: Property 'RequestCancelled' does not exist on type 'typeof ErrorCodes'. 264 ErrorCodes.RequestCancelled, ~~~~~~~~~~~~~~~~ src/index.ts:79:47 - error TS2558: Expected 1 type arguments, but got 2. 79 const exitNotification = new NotificationType<[number, string?], void>( ~~~~~~~~~~~~~~~~~~~~~~~ src/validate.ts:33:3 - error TS2558: Expected 1 type arguments, but got 2. 33 VersionedTextDocumentIdentifier, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34 void ~~~~~~ src/validate.ts:184:38 - error TS2571: Object is of type 'unknown'. 184 const document = documents.get(identifier.uri) ~~~~~~~~~~ src/validate.ts:199:19 - error TS2571: Object is of type 'unknown'. 199 (document) => document.version ~~~~~~~~ Found 56 errors. npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! stylelint-lsp@1.2.0 build: `tsc -p tsconfig.build.json` npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the stylelint-lsp@1.2.0 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! /home/grzegorz/.npm/_logs/2021-04-22T08_31_32_542Z-debug.log ERROR: "build" exited with 2. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! stylelint-lsp@1.2.0 prepare: `run-s clean build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the stylelint-lsp@1.2.0 prepare 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! /home/grzegorz/.npm/_logs/2021-04-22T08_31_32_611Z-debug.log added 284 packages from 210 contributors and audited 855 packages in 5.62s 64 packages are looking for funding run `npm fund` for details found 0 vulnerabilities internal/modules/cjs/loader.js:818 throw err; ^ Error: Cannot find module 'tslib' Require stack: - /home/grzegorz/projects/open-source/stylelint-lsp/dist/index.js at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15) at Function.Module._load (internal/modules/cjs/loader.js:667:27) at Module.require (internal/modules/cjs/loader.js:887:19) at require (internal/modules/cjs/helpers.js:74:18) at Object. (/home/grzegorz/projects/open-source/stylelint-lsp/dist/index.js:4:17) at Module._compile (internal/modules/cjs/loader.js:999:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) at Module.load (internal/modules/cjs/loader.js:863:32) at Function.Module._load (internal/modules/cjs/loader.js:708:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12) { code: 'MODULE_NOT_FOUND', requireStack: [ '/home/grzegorz/projects/open-source/stylelint-lsp/dist/index.js' ] } ```

Logs with this commit ``` 10:34 $ rm dist node_modules -rf && npm i; rm node_modules -rf && npm i --production && node dist/index.js npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142 npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated > husky@4.2.5 install /home/grzegorz/projects/open-source/stylelint-lsp/node_modules/husky > node husky install husky > Setting up git hooks husky > Done > husky@4.2.5 postinstall /home/grzegorz/projects/open-source/stylelint-lsp/node_modules/husky > opencollective-postinstall || exit 0 Thank you for using husky! If you rely on this package, please consider supporting our open collective: > https://opencollective.com/husky/donate > stylelint-lsp@1.2.0 prepare /home/grzegorz/projects/open-source/stylelint-lsp > run-s clean build > stylelint-lsp@1.2.0 clean /home/grzegorz/projects/open-source/stylelint-lsp > rimraf dist > stylelint-lsp@1.2.0 build /home/grzegorz/projects/open-source/stylelint-lsp > tsc -p tsconfig.build.json node_modules/vscode-languageserver/lib/callHierarchy.proposed.d.ts:5:58 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'CallHierarchyPrepareParams'. 5 onPrepare(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/callHierarchy.proposed.d.ts:5:95 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'CallHierarchyItem'. 5 onPrepare(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/callHierarchy.proposed.d.ts:6:64 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'CallHierarchyIncomingCallsParams'. 6 onIncomingCalls(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/callHierarchy.proposed.d.ts:6:107 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'CallHierarchyIncomingCall'. 6 onIncomingCalls(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/callHierarchy.proposed.d.ts:6:152 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'CallHierarchyIncomingCall'. 6 onIncomingCalls(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/callHierarchy.proposed.d.ts:7:64 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'CallHierarchyOutgoingCallsParams'. 7 onOutgoingCalls(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/callHierarchy.proposed.d.ts:7:107 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'CallHierarchyOutgoingCall'. 7 onOutgoingCalls(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/callHierarchy.proposed.d.ts:7:152 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'CallHierarchyOutgoingCall'. 7 onOutgoingCalls(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:3:557 - error TS2305: Module '"../../vscode-languageserver-protocol/lib/common/api"' has no exported member 'RPCMessageType'. 3 import { TextDocumentContentChangeEvent, TextDocumentSaveReason, Location, Command, TextEdit, WorkspaceEdit, CompletionItem, CompletionList, Hover, SignatureHelp, Definition, DocumentHighlight, SymbolInformation, DocumentSymbol, WorkspaceSymbolParams, DocumentSymbolParams, CodeLens, DocumentLink, Range, RequestType, RequestType0, RequestHandler, RequestHandler0, GenericRequestHandler, StarRequestHandler, HandlerResult, NotificationType, NotificationType0, NotificationHandler, NotificationHandler0, GenericNotificationHandler, StarNotificationHandler, RPCMessageType, MessageReader, MessageWriter, CancellationToken, Disposable, Event, ConnectionStrategy, InitializeParams, InitializeResult, InitializeError, InitializedParams, MessageActionItem, DidChangeConfigurationParams, DidOpenTextDocumentParams, DidChangeTextDocumentParams, DidCloseTextDocumentParams, DidSaveTextDocumentParams, WillSaveTextDocumentParams, DidChangeWatchedFilesParams, PublishDiagnosticsParams, CompletionParams, ReferenceParams, CodeActionParams, CodeLensParams, DocumentFormattingParams, DocumentRangeFormattingParams, DocumentOnTypeFormattingParams, RenameParams, DocumentLinkParams, ExecuteCommandParams, ApplyWorkspaceEditParams, ApplyWorkspaceEditResponse, ClientCapabilities, ServerCapabilities, DocumentColorParams, ColorInformation, ColorPresentationParams, ColorPresentation, CodeAction, FoldingRangeParams, FoldingRange, Declaration, DeclarationLink, DefinitionLink, SelectionRange, SelectionRangeParams, ProgressType, HoverParams, SignatureHelpParams, DefinitionParams, DocumentHighlightParams, PrepareRenameParams, DeclarationParams, TypeDefinitionParams, ImplementationParams, WorkDoneProgressParams, PartialResultParams } from 'vscode-languageserver-protocol'; ~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:260:19 - error TS2315: Type 'NotificationType0' is not generic. 260 add(type: NotificationType0, registerParams: RO): void; ~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:261:22 - error TS2314: Generic type 'NotificationType

' requires 1 type argument(s). 261 add(type: NotificationType, registerParams: RO): void; ~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:267:25 - error TS2314: Generic type 'RequestType0' requires 2 type argument(s). 267 add(type: RequestType0, registerParams: RO): void; ~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:268:28 - error TS2314: Generic type 'RequestType' requires 3 type argument(s). 268 add(type: RequestType, registerParams: RO): void; ~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:304:24 - error TS2315: Type 'NotificationType0' is not generic. 304 register(type: NotificationType0, registerParams?: RO): Promise; ~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:305:27 - error TS2314: Generic type 'NotificationType

' requires 1 type argument(s). 305 register(type: NotificationType, registerParams?: RO): Promise; ~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:313:61 - error TS2315: Type 'NotificationType0' is not generic. 313 register(unregisteration: BulkUnregistration, type: NotificationType0, registerParams?: RO): Promise; ~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:314:64 - error TS2314: Generic type 'NotificationType

' requires 1 type argument(s). 314 register(unregisteration: BulkUnregistration, type: NotificationType, registerParams?: RO): Promise; ~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:321:30 - error TS2314: Generic type 'RequestType0' requires 2 type argument(s). 321 register(type: RequestType0, registerParams?: RO): Promise; ~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:322:33 - error TS2314: Generic type 'RequestType' requires 3 type argument(s). 322 register(type: RequestType, registerParams?: RO): Promise; ~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:330:67 - error TS2314: Generic type 'RequestType0' requires 2 type argument(s). 330 register(unregisteration: BulkUnregistration, type: RequestType0, registerParams?: RO): Promise; ~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:331:70 - error TS2314: Generic type 'RequestType' requires 3 type argument(s). 331 register(unregisteration: BulkUnregistration, type: RequestType, registerParams?: RO): Promise; ~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:418:31 - error TS2314: Generic type 'RequestType0' requires 2 type argument(s). 418 onRequest(type: RequestType0, handler: RequestHandler0): void; ~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:419:34 - error TS2314: Generic type 'RequestType' requires 3 type argument(s). 419 onRequest(type: RequestType, handler: RequestHandler): void; ~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:439:33 - error TS2314: Generic type 'RequestType0' requires 2 type argument(s). 439 sendRequest(type: RequestType0, token?: CancellationToken): Promise; ~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:440:36 - error TS2314: Generic type 'RequestType' requires 3 type argument(s). 440 sendRequest(type: RequestType, params: P, token?: CancellationToken): Promise; ~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:455:30 - error TS2315: Type 'NotificationType0' is not generic. 455 onNotification(type: NotificationType0, handler: NotificationHandler0): void; ~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:456:33 - error TS2314: Generic type 'NotificationType

' requires 1 type argument(s). 456 onNotification(type: NotificationType, handler: NotificationHandler

): void; ~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:476:32 - error TS2315: Type 'NotificationType0' is not generic. 476 sendNotification(type: NotificationType0): void; ~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:477:35 - error TS2314: Generic type 'NotificationType

' requires 1 type argument(s). 477 sendNotification(type: NotificationType, params: P): void; ~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/sematicTokens.proposed.d.ts:5:51 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'SemanticTokensParams'. 5 on(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/sematicTokens.proposed.d.ts:5:82 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'SemanticTokens'. 5 on(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/sematicTokens.proposed.d.ts:5:107 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'SemanticTokensPartialResult'. 5 on(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/sematicTokens.proposed.d.ts:6:56 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'SemanticTokensEditsParams'. 6 onEdits(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/sematicTokens.proposed.d.ts:6:92 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'SemanticTokensEdits'. 6 onEdits(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/sematicTokens.proposed.d.ts:6:123 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'SemanticTokens'. 6 onEdits(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/sematicTokens.proposed.d.ts:6:148 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'SemanticTokensEditsPartialResult'. 6 onEdits(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/sematicTokens.proposed.d.ts:6:192 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'SemanticTokensEditsPartialResult'. 6 onEdits(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/sematicTokens.proposed.d.ts:7:56 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'SemanticTokensRangeParams'. 7 onRange(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/sematicTokens.proposed.d.ts:7:92 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'SemanticTokens'. 7 onRange(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/sematicTokens.proposed.d.ts:7:117 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'SemanticTokensPartialResult'. 7 onRange(handler: ServerRequestHandler): void; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/sematicTokens.proposed.d.ts:23:23 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'SemanticTokens'. 23 build(): Proposed.SemanticTokens; ~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/sematicTokens.proposed.d.ts:25:28 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'SemanticTokens'. 25 buildEdits(): Proposed.SemanticTokens | Proposed.SemanticTokensEdits; ~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/sematicTokens.proposed.d.ts:25:54 - error TS2694: Namespace '"/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver-protocol/lib/common/api".Proposed' has no exported member 'SemanticTokensEdits'. 25 buildEdits(): Proposed.SemanticTokens | Proposed.SemanticTokensEdits; ~~~~~~~~~~~~~~~~~~~ src/buffered-message-queue.ts:9:3 - error TS2459: Module '"../node_modules/vscode-languageserver/lib/main"' declares 'RPCMessageType' locally, but it is not exported. 9 RPCMessageType, ~~~~~~~~~~~~~~ node_modules/vscode-languageserver/lib/main.d.ts:3:557 3 import { TextDocumentContentChangeEvent, TextDocumentSaveReason, Location, Command, TextEdit, WorkspaceEdit, CompletionItem, CompletionList, Hover, SignatureHelp, Definition, DocumentHighlight, SymbolInformation, DocumentSymbol, WorkspaceSymbolParams, DocumentSymbolParams, CodeLens, DocumentLink, Range, RequestType, RequestType0, RequestHandler, RequestHandler0, GenericRequestHandler, StarRequestHandler, HandlerResult, NotificationType, NotificationType0, NotificationHandler, NotificationHandler0, GenericNotificationHandler, StarNotificationHandler, RPCMessageType, MessageReader, MessageWriter, CancellationToken, Disposable, Event, ConnectionStrategy, InitializeParams, InitializeResult, InitializeError, InitializedParams, MessageActionItem, DidChangeConfigurationParams, DidOpenTextDocumentParams, DidChangeTextDocumentParams, DidCloseTextDocumentParams, DidSaveTextDocumentParams, WillSaveTextDocumentParams, DidChangeWatchedFilesParams, PublishDiagnosticsParams, CompletionParams, ReferenceParams, CodeActionParams, CodeLensParams, DocumentFormattingParams, DocumentRangeFormattingParams, DocumentOnTypeFormattingParams, RenameParams, DocumentLinkParams, ExecuteCommandParams, ApplyWorkspaceEditParams, ApplyWorkspaceEditResponse, ClientCapabilities, ServerCapabilities, DocumentColorParams, ColorInformation, ColorPresentationParams, ColorPresentation, CodeAction, FoldingRangeParams, FoldingRange, Declaration, DeclarationLink, DefinitionLink, SelectionRange, SelectionRangeParams, ProgressType, HoverParams, SignatureHelpParams, DefinitionParams, DocumentHighlightParams, PrepareRenameParams, DeclarationParams, TypeDefinitionParams, ImplementationParams, WorkDoneProgressParams, PartialResultParams } from 'vscode-languageserver-protocol'; ~~~~~~~~~~~~~~ 'RPCMessageType' is declared here. src/buffered-message-queue.ts:145:11 - error TS2314: Generic type 'RequestType' requires 3 type argument(s). 145 type: RequestType, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/buffered-message-queue.ts:150:38 - error TS7006: Parameter 'param' implicitly has an 'any' type. 150 this.connection.onRequest(type, (param, token) => { ~~~~~ src/buffered-message-queue.ts:150:45 - error TS7006: Parameter 'token' implicitly has an 'any' type. 150 this.connection.onRequest(type, (param, token) => { ~~~~~ src/buffered-message-queue.ts:181:11 - error TS2314: Generic type 'NotificationType

' requires 1 type argument(s). 181 type: NotificationType, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/buffered-message-queue.ts:186:42 - error TS7006: Parameter 'param' implicitly has an 'any' type. 186 this.connection.onNotification(type, param => { ~~~~~ src/buffered-message-queue.ts:204:11 - error TS2314: Generic type 'NotificationType

' requires 1 type argument(s). 204 type: NotificationType, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/buffered-message-queue.ts:244:24 - error TS2339: Property 'RequestCancelled' does not exist on type 'typeof ErrorCodes'. 244 ErrorCodes.RequestCancelled, ~~~~~~~~~~~~~~~~ src/buffered-message-queue.ts:264:24 - error TS2339: Property 'RequestCancelled' does not exist on type 'typeof ErrorCodes'. 264 ErrorCodes.RequestCancelled, ~~~~~~~~~~~~~~~~ src/index.ts:79:47 - error TS2558: Expected 1 type arguments, but got 2. 79 const exitNotification = new NotificationType<[number, string?], void>( ~~~~~~~~~~~~~~~~~~~~~~~ src/validate.ts:33:3 - error TS2558: Expected 1 type arguments, but got 2. 33 VersionedTextDocumentIdentifier, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34 void ~~~~~~ src/validate.ts:184:38 - error TS2571: Object is of type 'unknown'. 184 const document = documents.get(identifier.uri) ~~~~~~~~~~ src/validate.ts:199:19 - error TS2571: Object is of type 'unknown'. 199 (document) => document.version ~~~~~~~~ Found 56 errors. npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! stylelint-lsp@1.2.0 build: `tsc -p tsconfig.build.json` npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the stylelint-lsp@1.2.0 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! /home/grzegorz/.npm/_logs/2021-04-22T08_35_05_363Z-debug.log ERROR: "build" exited with 2. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! stylelint-lsp@1.2.0 prepare: `run-s clean build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the stylelint-lsp@1.2.0 prepare 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! /home/grzegorz/.npm/_logs/2021-04-22T08_35_05_439Z-debug.log npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142 npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^2.1.2 (node_modules/jest-haste-map/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) added 284 packages from 210 contributors and audited 855 packages in 12.764s 64 packages are looking for funding run `npm fund` for details found 0 vulnerabilities /home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver/lib/main.js:721 throw new Error('Connection input stream is not set. ' + commandLineMessage); ^ Error: Connection input stream is not set. Use arguments of createConnection or set command line parameters: '--node-ipc', '--stdio' or '--socket={number}' at _createConnection (/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver/lib/main.js:721:15) at Object.createConnection (/home/grzegorz/projects/open-source/stylelint-lsp/node_modules/vscode-languageserver/lib/main.js:668:12) at Object. (/home/grzegorz/projects/open-source/stylelint-lsp/dist/index.js:14:44) at Module._compile (internal/modules/cjs/loader.js:999:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) at Module.load (internal/modules/cjs/loader.js:863:32) at Function.Module._load (internal/modules/cjs/loader.js:708:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12) at internal/main/run_main_module.js:17:47 ```

The language server now seems to return a correct error message.

Unfortunately, as you can see, I still am encountering problems when building the package using npm (tsc logs many errors), but that is probably an unrelated problem here (#16 )

codecov[bot] commented 3 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@dc3591d). Click here to learn what that means. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #15   +/-   ##
=========================================
  Coverage          ?   64.85%           
=========================================
  Files             ?        6           
  Lines             ?      350           
  Branches          ?       57           
=========================================
  Hits              ?      227           
  Misses            ?      104           
  Partials          ?       19           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update dc3591d...895432a. Read the comment docs.

bmatcuk commented 3 years ago

Thanks for the PR! I've decided to include tslib as a dependency in https://github.com/bmatcuk/stylelint-lsp/commit/de6a05b466f5c9d30b772dea18aeb445f0d8a82b instead of removing importHelpers. Let me know if that works for you! Additional conversion in #16

Gelio commented 3 years ago

@bmatcuk as you've said, the problem is solved 🙂 Thanks!

Confirmation info in https://github.com/bmatcuk/stylelint-lsp/issues/16#issuecomment-826139303