nuxt-typescript icon indicating copy to clipboard operation
nuxt-typescript copied to clipboard

Error: fork-ts-checker-webpack-plugin hooks are already in use

Open sweetim opened this issue 7 years ago • 6 comments
trafficstars

After I run npm run dev, whenever I saved a .js extension file, it will throw an error shown below

✖ error Error: fork-ts-checker-webpack-plugin hooks are already in use
  at ForkTsCheckerWebpackPlugin.registerCustomHooks (/mnt/d/workspace/timx-site/node_modules/fork-ts-checker-webpack-plugin/lib/index.js:187:19)  at ForkTsCheckerWebpackPlugin.apply (/mnt/d/workspace/timx-site/node_modules/fork-ts-checker-webpack-plugin/lib/index.js:100:22)
  at webpack (/mnt/d/workspace/timx-site/node_modules/webpack/lib/webpack.js:37:12)
  at compilers.compilersOptions.map (/mnt/d/workspace/timx-site/node_modules/nuxt-edge/dist/nuxt.js:3919:24)
  at Array.map (<anonymous>)
  at Builder.webpackBuild (/mnt/d/workspace/timx-site/node_modules/nuxt-edge/dist/nuxt.js:3918:39)

Is there anyway I can exclude .js file extension? or resolve this problem?

I am currently using

"nuxt-edge": "^2.0.0-25623921.73d1b9d",
"nuxt-typescript": "^0.11.0",
"typescript": "^3.0.3",
"ts-loader": "^5.1.1",

sweetim avatar Sep 20 '18 14:09 sweetim

@sweetim as far as I'm aware nuxt-edge wasn't supported yet as the module author was waiting for the stable nuxt2 release (which happened 2 days ago) - pls have a look at / keep track of https://github.com/wagerfield/nuxt-typescript/issues/3

hartmut-co-uk avatar Sep 23 '18 15:09 hartmut-co-uk

@hartmut-co-uk, @sweetim I will be updating this module over the coming days to support Nuxt 2.0—stay tuned 🎉

wagerfield avatar Sep 24 '18 09:09 wagerfield

Following this as it appears to be a problem we're hitting as well.

ktiedt avatar Nov 15 '18 22:11 ktiedt

@wagerfield Also following...any update by chance?

CosmicPangolin avatar Nov 30 '18 01:11 CosmicPangolin

Hi, as a side note - there's a lot of movement on nuxt for better ts support and bringing @wagerfield's work into create-nuxt-app / as a nuxt core module https://github.com/nuxt/create-nuxt-app/issues/23#issuecomment-442576246 https://github.com/nuxt/nuxt.js/pull/4164 where this repo wagerfield/nuxt-typescript has been repeatedly mentioned/suggested as a reference

hartmut-co-uk avatar Dec 01 '18 14:12 hartmut-co-uk

Sadly this has caused us to second guess using Nuxt and moved back to just using the Vue cli where TS easily integrates without any fuss.

ktiedt avatar Dec 01 '18 16:12 ktiedt