-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Closed
Description
Version
4.2.3
Environment info
Environment Info:
System:
OS: Linux 4.15 Ubuntu 18.04.2 LTS (Bionic Beaver)
CPU: (8) x64 Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
Binaries:
Node: 12.15.0 - ~/.nvm/versions/node/v12.15.0/bin/node
Yarn: 1.22.1 - /usr/bin/yarn
npm: 6.13.4 - ~/.nvm/versions/node/v12.15.0/bin/npm
Browsers:
Chrome: 80.0.3987.122
Firefox: 73.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
@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.2.3
@vue/cli-plugin-babel: ~4.2.0 => 4.2.3
@vue/cli-plugin-e2e-cypress: ~4.2.0 => 4.2.3
@vue/cli-plugin-eslint: ~4.2.0 => 4.2.3
@vue/cli-plugin-pwa: ~4.2.0 => 4.2.3
@vue/cli-plugin-router: ~4.2.0 => 4.2.3
@vue/cli-plugin-typescript: ~4.2.0 => 4.2.3
@vue/cli-plugin-unit-jest: ~4.2.0 => 4.2.3
@vue/cli-plugin-vuex: ~4.2.0 => 4.2.3
@vue/cli-service: ~4.2.0 => 4.2.3
@vue/cli-shared-utils: 4.2.3
@vue/component-compiler-utils: 3.1.1
@vue/eslint-config-typescript: ^5.0.1 => 5.0.2
@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
eslint-plugin-vue: ^6.1.2 => 6.2.2
jest-serializer-vue: 2.0.2
typescript: ~3.7.5 => 3.7.5
vue: ^2.6.11 => 2.6.11
vue-class-component: ^7.2.2 => 7.2.3
vue-eslint-parser: 7.0.0
vue-hot-reload-api: 2.3.4
vue-jest: 3.0.5
vue-loader: 15.9.0
vue-property-decorator: ^8.3.0 => 8.4.0
vue-router: ^3.1.5 => 3.1.6
vue-style-loader: 4.1.2
vue-template-compiler: ^2.6.11 => 2.6.11
vue-template-es2015-compiler: 1.9.1
vuex: ^3.1.2 => 3.1.3
npmGlobalPackages:
@vue/cli: 4.2.2
Steps to reproduce
- Create app and lib :
vue create app-test && vue create lib-test
with maxi-bestof options for both - In
lib-test
:
a. Change all in src/main.ts
for :
import HelloWorld from './components/HelloWorld.vue';
export default HelloWorld;
b. In package.json
, set "main": "./dist/lib-test.common.js"
c. Create symlink : yarn link
(or npm link
, same result)
d. Build the lib in watch mode : npx vue-cli-service build --target lib --watch --name lib-test src/main.ts
- In
app-test
:
a. Link the lib : yarn link lib-test
(at this point you can test with yarn add <PATH_TO_LIB>
, and it will works perfectly, but not with yarn link <LIB_LINK_NAME>
)
b. Run the app : yarn serve
What is expected?
yarn link
should have the same behavior as yarn add
What is actually happening?
With yarn add <PATH_TO_LIB>
it works fine, but with yarn link <LIB_LINK_NAME>
we get the error :
ERROR Failed to compile with 1 errors 15:04:04
error in ../lib-test/dist/lib-test.common.js
Module build failed (from ./node_modules/eslint-loader/index.js):
Error: Failed to load plugin 'import' declared in '../lib-test/.eslintrc.js » @vue/eslint-config-airbnb » /home/loheek/workspace/issues/vue-cli/lib-test/node_modules/eslint-config-airbnb-base/index.js » /home/loheek/workspace/issues/vue-cli/lib-test/node_modules/eslint-config-airbnb-base/rules/imports.js': Cannot find module 'eslint-plugin-import'
Require stack:
- /home/loheek/workspace/issues/vue-cli/app-test/__placeholder__.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:793:17)
at Function.resolve (internal/modules/cjs/helpers.js:80:19)
at Object.resolve (/home/loheek/workspace/issues/vue-cli/app-test/node_modules/eslint/lib/shared/relative-module-resolver.js:44:50)
at ConfigArrayFactory._loadPlugin
Could not paste all traceback because of issue size limitation
Metadata
Metadata
Assignees
Labels
No labels