Giter VIP home page Giter VIP logo

Comments (8)

johnnyreilly avatar johnnyreilly commented on May 21, 2024

I'd suggest clearing your node modules and reinstalling - btw you didn't share your plugin setup..

from fork-ts-checker-webpack-plugin.

nidu avatar nidu commented on May 21, 2024

@johnnyreilly Thanks, it helped!

from fork-ts-checker-webpack-plugin.

nidu avatar nidu commented on May 21, 2024

Unfortunately i was wrong. Error just didn't appear until i resolve webpack errors. Plugin configuration is default - just new ForkTsCheckerWebpackPlugin(). Maybe there's some dependency that probably may be the reason?

EDIT: Error starts with [email protected], 2.3.2 doesn't show this error.

from fork-ts-checker-webpack-plugin.

nidu avatar nidu commented on May 21, 2024

According to this (function logErrors) diagnostic.file can be nil.

Wrapping code inside NormalizedMessage.createFromDiagnostic in if (diagnostic.file) and printing diagnostic i've got in console:

 66% building modules 862/921 modules 59 active ...ct\lib\ReactTransitionChildMapping.js###DIAG { file: undefined,
  start: undefined,
  length: undefined,
  messageText: 'Cannot find global value \'Promise\'.',
  category: 1,
  code: 2468 }
 95% emittingERROR in undefined(undefined,undefined):
TS2468: Cannot find global value 'Promise'.

So maybe reading diagnostic.file attributes should be wrapped in if (diagnostic.file)?

from fork-ts-checker-webpack-plugin.

johnnyreilly avatar johnnyreilly commented on May 21, 2024

Thanks for digging into this @nidu. You're seeing:

TS2468: Cannot find global value 'Promise'.

Are you running in a super old version of node?

It would be useful if you could provide a minimal reproduction of the issue; it's hard to know if this is a configuration problem or a bug with fork-ts-checker-webpack-plugin.

from fork-ts-checker-webpack-plugin.

nidu avatar nidu commented on May 21, 2024

@johnnyreilly environment is as following:

Windows 7x64
webpack 3.10.0
node 6.11.0
npm 3.10.7
typescript 2.6.2
fork-ts-checker-webpack-plugin 0.2.9
ts-loader 3.2.0

I resolved the error by adding es6-promise to the project so this particular error was mine. But at the same time i think checker should print error and errors like this can occur. Moreover according to example from my link above diagnostic.file can be undefined so i suppose nil check is worth adding.

from fork-ts-checker-webpack-plugin.

johnnyreilly avatar johnnyreilly commented on May 21, 2024

Yeah that sounds reasonable. If you get a chance to submit a PR I'm sure @piotr-oles would be appreciative

from fork-ts-checker-webpack-plugin.

piotr-oles avatar piotr-oles commented on May 21, 2024

PR merged, will be released as v0.2.10 :)

from fork-ts-checker-webpack-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.