using @nuxt/typescript-build causes dead loop (npm only)
See original GitHub issueDescribe the bug When I run nuxt app using nuxt-ts in hoisted lerna monorepo, it causes weird behavior: when I open serve address, see 5 continuous reloads and this message:
To Reproduce Steps to reproduce the behavior:
- Clone repository https://github.com/georgyfarniev/nuxt_lerna_repro
- Run
npm i && npm run bootstrap
- Run
cd repro && npm run dev
- Open localhost:7005
- See error described above
Expected behavior Working correctly with hoisted lerna monorepo.
Additional context Reproducible in both Windows 10 and Node 12, as well as Arch Linux with Node 12. Please pay attention to lerna.json, as hoisted mode are enabled there.
Also, it’s probably nuxt-ts issue, because everything works well with plain nuxt
This bug is a critical blocker for us, since we cannot use our applications written in nuxt+typescript using our lerna setup which is vital for us, so I will keep monitoring this issue and I’m ready to provide any possible assistance with fixing it.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:94 (2 by maintainers)
Top GitHub Comments
@frankier @lights0123
I had the same issue (ERROR When you use this plugin you must install typescript). Was able to resolve it in
nuxt.config
:I get this error:
I’m using a yarn workspace. The error occurs in the catch statement:
The variable
typescriptPath
is equal to:The following change makes the build succeed:
so this module seems to be passing an object when a string is expected. However, that seems to be because the version of fork-ts-checker-webpack-plugin that yarn decided to install was version 3, even though this project asks for v5 (it installs a separate package, fork-ts-checker-webpack-plugin-v5, that does not exist on npm). This is because I had a vue-cli app in another package, which uses v3. Adding
fork-ts-checker-webpack-plugin
as a dev dependency to my package fixed the issue.