Skip to content

ForkTSCheckerWebpackPlugin given wrong API schema #1563

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
Huespal opened this issue May 27, 2021 · 5 comments
Closed

ForkTSCheckerWebpackPlugin given wrong API schema #1563

Huespal opened this issue May 27, 2021 · 5 comments

Comments

@Huespal
Copy link

Huespal commented May 27, 2021

Hello :)

What is the current behaviour?
Build is not completed due to a validation error.

Steps to Reproduce
Run preact build from a terminal on a Preact project.

What is the expected behaviour?
Build is completed without errors.

Please mention any other relevant information
The error is this:

✖ ERROR ValidationError: Invalid configuration object. ForkTsCheckerWebpackPlugin has been initialized using a configuration object that does not match the API schema.
 - configuration has an unknown property 'silent'. These properties are valid:
   object { async?, typescript?, eslint?, formatter?, issue?, logger? }

And continues with the error trace.

Project is using webpack 4, and Typescript 4.2.4.

It was not happening a week before. Nothing from the code has changed.

So the error has come with preact-cli v3.2.0. With v3.1.0 is working as expected.

tsconfig.js file

{
  "compilerOptions": {
    "allowJs": true,
    "allowSyntheticDefaultImports": true,
    "jsx": "preserve",
    "jsxImportSource": "preact",
    "jsxFactory": "h",
    "jsxFragmentFactory": "Fragment",
    "lib": ["dom", "esnext"],
    "moduleResolution": "node",
    "noEmit": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "preserveConstEnums": true,
    "removeComments": false,
    "skipLibCheck": true,
    "sourceMap": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "esModuleInterop": true,
    "resolveJsonModule": true,
    "isolatedModules": true
  },
  "exclude": ["build/**/*", "node_modules/**/*.*"],
  "include": ["**/*.ts", "**/*.tsx"]
}
Environment Info:
  System:
    OS: macOS 11.3.1
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Binaries:
    Node: 15.2.1 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 7.11.2 - /usr/local/bin/npm
  Browsers:
    Chrome: 90.0.4430.212
    Firefox: 87.0
    Safari: 14.1
  npmPackages:
    preact: 10.5.13 => 10.5.13 
    preact-cli: ^3.2.0 => 3.2.0 
    preact-render-to-string: 5.1.19 => 5.1.19
@rschristian rschristian changed the title Preact build TS error ForkTSCheckerWebpackPlugin given wrong API schema May 27, 2021
@rschristian
Copy link
Member

Yeah it's an issue from #1465. I'll try to get that corrected tomorrow morning. I guess we don't have TS tests so this slipped through. Sorry about that.

@rschristian
Copy link
Member

I didn't forget about this, but after fixing the config the plugin completely locks up the build process. Not really sure what's going on there or if it's an upstream issue.

@Gamesh
Copy link

Gamesh commented May 29, 2021

Maybe a revert would be easier? Until it's resolved, as 3.2 version because of this is completely broken for me

@rschristian
Copy link
Member

rschristian commented May 29, 2021

We did revert in #1567.

You should be able to use your preact.config.js to remove the plugin I believe if you can't wait.

@rschristian
Copy link
Member

Closing as the fix has been merged

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

3 participants