vitejs / vite

Next generation frontend tooling. It's fast!
http://vite.dev
MIT License
69.11k stars 6.25k forks source link

Vite 2.4.0 start failed with lerna #4139

Closed danranVm closed 3 years ago

danranVm commented 3 years ago

Describe the bug

After upgrading to version 2.4.0, execution of npm start failed, rollback to version 2.3.0 can be executed successfully

// npm start
execNodeTask('lerna', ['run', 'start', '--scope', '@idux/site', '--stream'])(done)
// lerna config
{
  "packages": ["packages/*"],
  "version": "0.0.1",
  "command": {
    "publish": {
      "allowBranch": ["main", "next"],
      "ignoreChanges": ["ignored-file", "*.md"],
      "message": "docs(release): publish %s",
      "registry": "https://registry.npmjs.org"
    },
    "bootstrap": {
      "ignore": "",
      "hoist": true,
      "npmClientArgs": ["--no-package-lock"]
    }
  }
}

Reproduction

https://github.com/IduxFE/idux

- "vite": "~2.3.0", // successfully
+ "vite": "^2.3.0", // failed

System Info

System:
    OS: Linux 4.19 Ubuntu 20.04.1 LTS (Focal Fossa)
    CPU: (8) x64 Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
    Memory: 21.55 GB / 25.01 GB
    Container: Yes
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 12.19.0 - ~/.nvm/versions/node/v12.19.0/bin/node
    Yarn: 1.22.10 - ~/.nvm/versions/node/v12.19.0/bin/yarn
    npm: 6.14.8 - ~/.nvm/versions/node/v12.19.0/bin/npm
  npmPackages:
    @vitejs/plugin-vue: ^1.2.0 => 1.2.4 
    vite: ^2.1.0 => 2.4.0

Used Package Manager

npm

Logs

npm start

> idux@0.0.0-NOT-USED start /home/vm/workspace/vue/idux
> gulp start --gulpfile ./scripts/gulp/gulpfile.ts

[09:58:44] Requiring external module ts-node/register
[09:58:44] Working directory changed to ~/workspace/vue/idux/scripts/gulp
[09:58:47] Using gulpfile ~/workspace/vue/idux/scripts/gulp/gulpfile.ts
[09:58:47] Starting 'start'...
[09:58:47] Starting 'iconsCopy'...
[09:58:47] Finished 'iconsCopy' after 819 μs
[09:58:47] Starting 'init'...
[09:58:47] Finished 'init' after 14 ms
[09:58:47] Starting 'start'...
lerna notice cli v4.0.0
lerna notice filter including "@idux/site"
lerna info filter [ '@idux/site' ]
lerna info Executing command in 1 package: "npm run start"
@idux/site: > @idux/site@0.0.0 start /home/vm/workspace/vue/idux/packages/site
@idux/site: > vite
lerna success run Ran npm script 'start' in 1 package in 0.6s:
lerna success - @idux/site

Validations

QingqiShi commented 3 years ago

This issue is now fixed for me after updating to v2.4.2

patak-dev commented 3 years ago

@danranVm would you confirm that this is fixed in 2.4.2?

danranVm commented 3 years ago

@QingqiShi @patak-js thanks, I just tried upgrading to 2.4.2 , it's been fixed.