Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

Can't resolve @vue/compile-sfc in monorepo /yarn workspace #6

Closed
LinusBorg opened this issue Aug 22, 2021 · 1 comment
Closed

Can't resolve @vue/compile-sfc in monorepo /yarn workspace #6

LinusBorg opened this issue Aug 22, 2021 · 1 comment
Labels

Comments

@LinusBorg
Copy link

LinusBorg commented Aug 22, 2021

I have installed this package in a yarn workspaces package. Both vue-dts-gen and @vue/compiler-sfc are therefore not located in the package's local node_modules, they are hoisted in the project root's node_modules.

In this scenario, this line fails to resolve the package:

vueCompiler = require(path.resolve('node_modules/@vue/compiler-sfc'))

node:69253) UnhandledPromiseRejectionWarning: Error: @vue/compiler-sfc is not founded in ./node_modules

I edited the line to a simle require('@vue/compiler-sfc') and that worked.

@egoist egoist closed this as completed in 30b569e Aug 22, 2021
@github-actions
Copy link

🎉 This issue has been resolved in version 0.2.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant