Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vue-cli-service serve --open didn't work when "Yarn Not Found" but yarn.lock exist #7416

Open
GoodZige opened this issue Aug 11, 2023 · 0 comments

Comments

@GoodZige
Copy link

Version

5.0.8

Reproduction link

github.com

Environment info

  System:
    OS: Windows 10 10.0.19045
    CPU: (8) x64 Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
  Binaries:
    Node: 14.8.0 - D:\Program Files\gnvm-bin-master\node.EXE
    Yarn: Not Found
    npm: 6.14.7 - D:\Program Files\gnvm-bin-master\npm.CMD
  Browsers:
    Chrome: Not Found
    Edge: Spartan (44.19041.1266.0), Chromium (115.0.1901.200)
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.2.1
    @vue/babel-plugin-transform-vue-jsx:  1.2.1
    @vue/babel-preset-app:  3.12.1
    @vue/babel-preset-jsx:  1.2.4
    @vue/babel-sugar-composition-api-inject-h:  1.2.1
    @vue/babel-sugar-composition-api-render-instance:  1.2.4
    @vue/babel-sugar-functional-vue:  1.2.2
    @vue/babel-sugar-inject-h:  1.2.2
    @vue/babel-sugar-v-model:  1.2.3
    @vue/babel-sugar-v-on:  1.2.3
    @vue/cli-overlay:  3.12.1
    @vue/cli-plugin-babel: ^3.8.0 => 3.12.1
    @vue/cli-plugin-eslint: ^3.8.0 => 3.12.1
    @vue/cli-service: ^3.8.0 => 3.12.1
    @vue/cli-shared-utils:  3.12.1
    @vue/component-compiler-utils:  3.3.0
    @vue/preload-webpack-plugin:  1.1.2
    @vue/web-component-wrapper:  1.3.0
    babel-helper-vue-jsx-merge-props:  2.0.3
    eslint-plugin-vue: ^5.0.0 => 5.2.3 (4.7.1)
    vue: ^2.6.10 => 2.6.14
    vue-eslint-parser:  2.0.3 (5.0.0)
    vue-hot-reload-api:  2.3.4
    vue-loader:  15.9.8
    vue-router: 3.0.6 => 3.0.6
    vue-style-loader:  4.1.3
    vue-template-compiler: ^2.6.10 => 2.6.14
    vue-template-es2015-compiler:  1.9.1
    vuex: ^3.6.0 => 3.6.0
    vuex-persistedstate: ^4.1.0 => 4.1.0
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

npm install
npm run dev

What is expected?

browser open automatically

What is actually happening?

browser didn't open


node_modules@vue\cli-service\lib\commands\serve.js line 244 - 247 throw error
because node_modules@vue\cli-shared-utils\lib\env.js line 46

function checkYarn (result) {
  if (result && !exports.hasYarn()) {
    // console.error(`The project seems to require yarn but it's not installed.`);// it would be work if use this code
    throw new Error(`The project seems to require yarn but it's not installed.`)// stop open browser
  }
  return result
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant