Skip to content

Does not work with npm link #1494

@apertureless

Description

@apertureless

Version

3.0.0-beta.15

Reproduction link

https://github.com/apertureless/vue-breakpoints

Steps to reproduce

  1. Check out the vue-breakpoints repo (as an example, happens with other packages, too)
  2. Create a new vue-cli@3 project with vue create
  3. Run npm install & npm run build && npm run link inside the vue-breakpoints repo
  4. Inside the newly created vue-cli@3 project run npm link vue-breakpoints
  5. import {hideAt} from 'vue-breakpoints' and use it.

What is expected?

That locally linked npm packeges are working.

What is actually happening?

It throws an error:

"export 'hideAt' was not found in 'vue-breakpoints'

Before that it also throws some errors regarding missing eslint packages that are installed in the vue-breakpoints repo but somehow the dependencies are not found.

In packages without named exports it throws

"export 'default' (imported as 'VueCookie') was not found in 'vue-cookie-law'

The output in vue-breakpoints is a umd module and should work everywhere. This also only happens with local linked packages. If I install it over npm it works fine. However I am often using npm link to test new pacakges or versions before releasing to npm.

This happens with various packages not only vue-breakpoints
And this only happens with projects created with vue create. The old vue init webpack projects are not affected by this. And the linking works fine.

If you need any more info, let me know ✌️

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions