Skip to content

Example build fails with Node.js 8 #8

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

Closed
franzbecker opened this issue Jul 20, 2017 · 5 comments
Closed

Example build fails with Node.js 8 #8

franzbecker opened this issue Jul 20, 2017 · 5 comments
Assignees
Labels

Comments

@franzbecker
Copy link

I cannot build the example on my machine with:

$ node --version
v8.2.0
$ npm --version
5.3.0

That seems to be a problem when using a newer Node.js / NPM version as you can see on Travis:
https://travis-ci.org/franzbecker/monaco-languageclient/jobs/255741802

The error occurs while compiling TypeScript:

> tsc

src/client.ts(60,57): error TS2345: Argument of type 'MessageConnection' is not assignable to parameter of type 'MessageConnection'.
  Types of property 'sendRequest' are incompatible.
    Type '{ <R, E, RO>(type: RequestType0<R, E, RO>, token?: CancellationToken | undefined): Thenable<R>; <...' is not assignable to type '{ <R, E, RO>(type: RequestType0<R, E, RO>, token?: CancellationToken | undefined): Thenable<R>; <...'. Two different types with this name exist, but they are unrelated.
      Types of parameters 'type' and 'type' are incompatible.
        Type 'RequestType0<any, any, any>' is not assignable to type 'RequestType0<any, any, any>'. Two different types with this name exist, but they are unrelated.
          Types have separate declarations of a private property '_'.
@franzbecker franzbecker changed the title Example build fails with Node.js 8 / NPM 5 Example build fails with Node.js 8 Jul 27, 2017
@Phantomape
Copy link

Any idea how to solve it ?

@franzbecker
Copy link
Author

Didn't have the time to research it any further, a quick Google searched revealed this issue: microsoft/TypeScript#16985 but not sure if it applies.

The project should definitely use NPM 5 or Yarn in order to tie down the dependencies that are used for the build.

@Phantomape
Copy link

I fixed this error using js8. I changed the dependency to "monaco-languageclient": "^0.1.0" in package.json instead of using source files in parent folder. Also, I change the compiler option to support es6 in addition to some other dependency paths. :)

@akosyakov akosyakov added the bug label Aug 25, 2017
@akosyakov
Copy link
Contributor

It is because of npm5: #19 (comment)

Should be fixed by: #25

@akosyakov akosyakov self-assigned this Aug 27, 2017
@akosyakov
Copy link
Contributor

Fixed by #25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants