Skip to content

build as library error,This dependency was not found:* ~entry in ./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js #5538

@zhouhuan327

Description

@zhouhuan327

Version

4.4.1

Reproduction link

https://github.com/zhouhuan327/awesome-wheels

Environment info

Environment Info:

  System:
    OS: Windows 10 10.0.18363
    CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
  Binaries:
    Node: 12.16.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.13.4 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 44.18362.449.0
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0
    @vue/babel-plugin-transform-vue-jsx:  1.1.2
    @vue/babel-preset-app:  4.2.3 (4.4.1)
    @vue/babel-preset-jsx:  1.1.2
    @vue/babel-sugar-functional-vue:  1.1.2
    @vue/babel-sugar-inject-h:  1.1.2
    @vue/babel-sugar-v-model:  1.1.2
    @vue/babel-sugar-v-on:  1.1.2
    @vue/cli-overlay:  4.4.1
    @vue/cli-plugin-babel: ~4.2.0 => 4.2.3
    @vue/cli-plugin-router:  4.4.1
    @vue/cli-plugin-unit-jest: ~4.3.0 => 4.3.1
    @vue/cli-plugin-vuex:  4.4.1
    @vue/cli-service: ^4.4.1 => 4.4.1
    @vue/cli-shared-utils:  4.4.1 (4.2.3, 4.3.1)
    @vue/component-compiler-utils:  3.1.2 (3.1.1)
    @vue/preload-webpack-plugin:  1.1.1
    @vue/test-utils: 1.0.0-beta.31 => 1.0.0-beta.31
    @vue/web-component-wrapper:  1.2.0
    jest-serializer-vue:  2.0.2
    vue: ^2.6.11 => 2.6.11
    vue-hot-reload-api:  2.3.4
    vue-jest:  undefined (3.0.5)
    vue-loader:  15.9.2
    vue-router:  3.3.1
    vue-server-renderer:  2.6.11
    vue-style-loader:  4.1.2
    vue-template-compiler: ^2.6.11 => 2.6.11
    vue-template-es2015-compiler:  1.9.1
    vuepress: ^1.5.0 => 1.5.0
    vuepress-html-webpack-plugin:  undefined (3.2.0)
    vuepress-plugin-container:  2.1.4
    vuepress-plugin-smooth-scroll:  0.0.3
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

run vue-cli-service build --target lib --name myLibName src/index.js

What is expected?

build success

What is actually happening?

i got error tips three times

 ERROR  Failed to compile with 1 errors                                                                                                 4:47:43 PM

This dependency was not found:

* ~entry in ./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js

To install it, you can run: npm install --save ~entry

run " vue-cli-service build" was successful
but build with "target lib" can not

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