preactjs-templates / typescript

The TypeScript template for Preact CLI
MIT License
114 stars 38 forks source link

Following the usage guide fails to run #35

Closed rmtsrc closed 4 years ago

rmtsrc commented 4 years ago

Following the usage guide, it currently fails with:

✖ ERROR ValidationError: ForkTsCheckerWebpackPlugin Invalid Options

options should NOT have additional properties
node -v
v12.18.2
npm -v
6.14.5

Output

npm install -g preact-cli

> preact-cli@2.2.1 postinstall /Users/seb/.nvm/versions/node/v12.18.2/lib/node_modules/preact-cli
> node -p 'require("./check.js")()'
true

+ preact-cli@2.2.1
updated 1 package in 19.837s
preact create typescript my-project

ℹ INFO Assuming you meant preactjs-templates/typescript...
✔ Done!

To get started, cd into the new directory:
  cd my-project

To start a development live-reload server:
  npm run start

To create a production build (in ./build):
  npm run build

To start a production HTTP/2 server:
  npm run serve
cd my-project
npm install

audited 1884 packages in 7.109s

88 packages are looking for funding
  run `npm fund` for details

found 1 moderate severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details
npm run dev

> my-project@0.0.0 dev /Users/seb/Development/testbed/my-project
> preact watch

✖ ERROR ValidationError: ForkTsCheckerWebpackPlugin Invalid Options

options should NOT have additional properties
options should NOT have additional properties
options should NOT have additional properties

    at Object.validateOptions [as default] (/Users/seb/Development/testbed/my-project/node_modules/fork-ts-checker-webpack-plugin/node_modules/schema-utils/src/validateOptions.js:32:11)
    at new ForkTsCheckerWebpackPlugin (/Users/seb/Development/testbed/my-project/node_modules/fork-ts-checker-webpack-plugin/lib/ForkTsCheckerWebpackPlugin.js:28:31)
    at module.exports (/Users/seb/Development/testbed/my-project/node_modules/preact-cli/lib/lib/webpack/webpack-base-config.js:315:7)
    at module.exports (/Users/seb/Development/testbed/my-project/node_modules/preact-cli/lib/lib/webpack/webpack-client-config.js:347:3)
    at devBuild (/Users/seb/Development/testbed/my-project/node_modules/preact-cli/lib/lib/webpack/run-webpack.js:15:21)
    at module.exports (/Users/seb/Development/testbed/my-project/node_modules/preact-cli/lib/lib/webpack/run-webpack.js:278:39)
    at module.exports (/Users/seb/Development/testbed/my-project/node_modules/preact-cli/lib/commands/watch.js:21:9)
    at Sade.parse (/Users/seb/Development/testbed/my-project/node_modules/sade/lib/index.js:190:56)
    at Object.<anonymous> (/Users/seb/Development/testbed/my-project/node_modules/preact-cli/lib/index.js:129:6)
    at Module._compile (internal/modules/cjs/loader.js:1138:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
    at Module.load (internal/modules/cjs/loader.js:986:32)
    at Function.Module._load (internal/modules/cjs/loader.js:879:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-project@0.0.0 dev: `preact watch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-project@0.0.0 dev 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!     /Users/seb/.npm/_logs/2020-07-09T19_29_35_395Z-debug.log
ForsakenHarmony commented 4 years ago

does it still happen after running npm i -D preact-cli@rc in the project and then npm run dev?

mkrl commented 4 years ago

does it still happen after running npm i -D preact-cli@rc in the project and then npm run dev?

Unfortunately, it still fails, I'm experiencing the same problem. Tried both @latest and @rc preact-cli to initially set the project up, as well as updating to @rc within the project.

5.3.0-61-generic #55~18.04.1-Ubuntu Linux
node -v 10.17.0
npm -v 6.11.3
ForsakenHarmony commented 4 years ago

It should be fixed with the latest rc

mkrl commented 4 years ago

It should be fixed with the latest rc

Can confirm it was fixed for me in rc 18. Thanks!

rmtsrc commented 4 years ago

This is now working correctly for me, thanks 👍