0

I've got a private npm package hosted on GitHub. The package is essentially a Vue component and I build it with vue-cli-service build --target lib --name init-map src/main.ts. Here's the main.ts's contents:

import InitMap from "./components/InitMap.vue";

export { InitMap };

I use the package inside my other project, and I develop them both simultaneously. Therefore, I want to link the package: yarn link (inside the package directory), then yarn link @smellyshovel/init-map inside the consuming-project directory.

The problem is that when I run "yarn serve" (i.e. vue-cli-service serve) inside the main project, it freezes on 69%...

The freeze

... and seems to stay like that forever.

Axios doesn't seem to be a problem to me (even though the message), since 1) everything is working fine without the linked package, 2) it shows a different message sometimes (something bootstrap-vue-related on 58%) though I only saw this other message like once (and not sure what exactly caused the difference).

What am I doing wrong? Why does the serve freezes when using a linked package as a dependency? How do I solve this?

Please, name me any other stuff you would like me to show since I'm not sure what exactly could be related to the issue and therefore haven't included any details that might be of interest.

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
smellyshovel
  • 176
  • 10

1 Answers1

0

OK, the problem indeed seems to be related to resolving symlinks, and the solution would be to simply prevent webpack from resolving these symlinks: https://github.com/vuejs/vue-cli/issues/1494#issuecomment-498144990

configureWebpack: {
    resolve: {
        symlinks: false,
    },
}
smellyshovel
  • 176
  • 10