Skip to content

Yarn2 compatibilityΒ #5135

Open
Open
@Jancat

Description

@Jancat

Version

4.1.2

Environment info

Environment Info:

  System:
    OS: macOS 10.15.2
    CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
  Binaries:
    Node: 13.7.0 - /usr/local/bin/node
    Yarn: 2.0.0-rc.27 - /usr/local/bin/yarn
    npm: 6.13.7 - /usr/local/bin/npm
  Browsers:
    Chrome: 79.0.3945.130
    Firefox: Not Found
    Safari: 13.0.4
  npmGlobalPackages:
    @vue/cli: 4.1.2

Steps to reproduce

  1. Run the vue create demo command, using the following presets:
"demo-preset": {
      "useConfigFiles": true,
      "plugins": {
        "@vue/cli-plugin-babel": {},
        "@vue/cli-plugin-typescript": {
          "classComponent": true,
          "useTsWithBabel": true
        },
        "@vue/cli-plugin-pwa": {},
        "@vue/cli-plugin-router": {
          "historyMode": true
        },
        "@vue/cli-plugin-vuex": {},
        "@vue/cli-plugin-eslint": {
          "config": "prettier",
          "lintOn": [
            "save",
            "commit"
          ]
        },
        "@vue/cli-plugin-unit-mocha": {}
      },
      "cssPreprocessor": "dart-sass"
    }

What is expected?

Create the project and run yarn serve successfully.

What is actually happening?

The shell output some errors:

➀ YN0050: The --registry option is deprecated; prefer setting npmRegistryServer in your .yarnrc.yml file
➀ YN0000: β”Œ Resolution step
➀ YN0032: β”‚ fsevents@npm:1.2.11: Implicit dependencies on node-gyp are discouraged
➀ YN0032: β”‚ fsevents@npm:1.2.11: Implicit dependencies on node-gyp are discouraged
➀ YN0032: β”‚ nan@npm:2.14.0: Implicit dependencies on node-gyp are discouraged
➀ YN0032: β”‚ evp_bytestokey@npm:1.0.3: Implicit dependencies on node-gyp are discouraged
➀ YN0002: β”‚ frontend@workspace:. doesn't provide eslint@>= 1.6.0 requested by @vue/cli-plugin-eslint@npm:4.1.2
➀ YN0002: β”‚ frontend@workspace:. doesn't provide typescript@>=2 requested by @vue/cli-plugin-typescript@npm:4.1.2
➀ YN0002: β”‚ frontend@workspace:. doesn't provide vue-template-compiler@^2.0.0 requested by @vue/cli-service@npm:4.1.2
➀ YN0002: β”‚ @vue/cli-plugin-unit-mocha@npm:4.1.2 [d9650] doesn't provide webpack@^4.0.0 requested by mochapack@npm:1.1.13
➀ YN0000: β”” Completed in 22.58s
➀ YN0000: β”Œ Fetch step
➀ YN0013: β”‚ @nodelib/fs.scandir@npm:2.1.3 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ @nodelib/fs.stat@npm:2.0.3 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ @nodelib/fs.walk@npm:1.2.4 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ @vue/cli-plugin-unit-mocha@npm:4.1.2 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ ansi-colors@npm:3.2.3 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ array-union@npm:2.1.0 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ browser-stdout@npm:1.3.1 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ diff@npm:3.5.0 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ dir-glob@npm:3.0.1 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ fast-glob@npm:3.1.1 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ fastq@npm:1.6.0 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ flat@npm:4.1.0 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ glob-parent@npm:5.1.0 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ glob@npm:7.1.3 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ globby@npm:10.0.2 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ growl@npm:1.10.5 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ ignore@npm:5.1.4 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ is-buffer@npm:2.0.4 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ jsdom-global@npm:3.0.2 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ mocha@npm:6.2.2 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ mochapack@npm:1.1.13 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ node-environment-flags@npm:1.0.5 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ nodent-runtime@npm:3.2.1 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ path-type@npm:4.0.0 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ progress@npm:2.0.3 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ reusify@npm:1.0.4 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ run-parallel@npm:1.1.9 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ supports-color@npm:6.0.0 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ toposort@npm:2.0.2 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ yargs-unparser@npm:1.6.0 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ yargs@npm:14.0.0 can't be found in the cache and will be fetched from the remote registry
➀ YN0000: β”” Completed in 6.18s
➀ YN0000: β”Œ Link step
➀ YN0007: β”‚ fsevents@patch:fsevents@npm%3A1.2.11#builtin<compat/fsevents>::version=1.2.11&hash=e8cd9e must be built because it never did before or the last one failed
➀ YN0007: β”‚ core-js@npm:3.6.4 must be built because it never did before or the last one failed
➀ YN0007: β”‚ yorkie@npm:2.0.0 must be built because it never did before or the last one failed
➀ YN0007: β”‚ core-js@npm:2.6.11 must be built because it never did before or the last one failed
➀ YN0007: β”‚ nodent-runtime@npm:3.2.1 must be built because it never did before or the last one failed
➀ YN0007: β”‚ ejs@npm:2.7.4 must be built because it never did before or the last one failed
➀ YN0009: β”‚ fsevents@patch:fsevents@npm%3A1.2.11#builtin<compat/fsevents>::version=1.2.11&hash=e8cd9e couldn't be built successfully (exit code 1, logs can be found here: /var/folders/td/q20k2cmj2f377tggk0t0z7wm0000gn/T/logfile-5370069TiMAau5XgP.log)
➀ YN0000: β”” Completed in 5.14s
➀ YN0000: Done with warnings in 33.95s
πŸš€  Invoking generators...
πŸ“¦  Installing additional dependencies...

➀ YN0050: The --registry option is deprecated; prefer setting npmRegistryServer in your .yarnrc.yml file
➀ YN0000: β”Œ Resolution step
➀ YN0002: β”‚ frontend@workspace:. doesn't provide eslint@>= 1.6.0 requested by @vue/cli-plugin-eslint@npm:4.1.2
➀ YN0002: β”‚ frontend@workspace:. doesn't provide typescript@>=2 requested by @vue/cli-plugin-typescript@npm:4.1.2
➀ YN0002: β”‚ frontend@workspace:. doesn't provide vue-template-compiler@^2.0.0 requested by @vue/cli-service@npm:4.1.2
➀ YN0002: β”‚ @vue/cli-plugin-unit-mocha@npm:4.1.2 [d9650] doesn't provide webpack@^4.0.0 requested by mochapack@npm:1.1.13
➀ YN0000: β”” Completed in 0.25s
➀ YN0000: β”Œ Fetch step
➀ YN0000: β”” Completed in 0.46s
➀ YN0000: β”Œ Link step
➀ YN0000: β”” Completed in 1.52s
➀ YN0000: Done with warnings in 2.27s
βš“  Running completion hooks...

πŸ“„  Generating README.md...

πŸŽ‰  Successfully created project frontend.
πŸ‘‰  Get started with the following commands:
$ cd frontend
$ yarn serve

The generated package.json was incomplete(missing scripts and dependencies):

{
  "name": "frontend",
  "version": "0.1.0",
  "private": true,
  "devDependencies": {
    "@vue/cli-plugin-babel": "^4.1.0",
    "@vue/cli-plugin-eslint": "^4.1.0",
    "@vue/cli-plugin-pwa": "^4.1.0",
    "@vue/cli-plugin-router": "^4.1.0",
    "@vue/cli-plugin-typescript": "^4.1.0",
    "@vue/cli-plugin-unit-mocha": "^4.1.0",
    "@vue/cli-plugin-vuex": "^4.1.0",
    "@vue/cli-service": "^4.1.0"
  }
}

Finally, faild to run yarn serve

Usage Error: Couldn't find a script named "serve".

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions