vitejs / vite

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

Type 'FSWatcher' is missing #15731

Closed IgorIlgiyaev closed 9 months ago

IgorIlgiyaev commented 9 months ago

Describe the bug

Type 'FSWatcher' is missing the following properties from type 'FSWatcher': ref, unref

843 export declare class FSWatcher extends EventEmitter implements fs.FSWatcher {



Found 1 error in ../node_modules/vite/dist/node/index.d.ts:843

### Reproduction

https://github.com/moshequ/vueflame

### Steps to reproduce

npm run setup

### System Info

```shell
System:
    OS: macOS 14.3
    CPU: (10) arm64 Apple M1 Pro
    Memory: 617.55 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.19.0 - ~/.nvm/versions/node/v18.19.0/bin/node
    Yarn: 1.22.21 - ~/.nvm/versions/node/v18.19.0/bin/yarn
    npm: 10.2.3 - ~/.nvm/versions/node/v18.19.0/bin/npm
    pnpm: 8.14.3 - ~/.nvm/versions/node/v18.19.0/bin/pnpm
    Watchman: 2022.10.03.00 - /opt/homebrew/bin/watchman
  Browsers:
    Chrome: 121.0.6167.85
    Edge: 120.0.2210.144
    Safari: 17.3
```

### Used Package Manager
```
{
  "name": "vueflame",
  "description": "Vueflame",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "setup": "npm i && npm run build && cd functions && npm i && npm run build",
    "clean": "rm -rf package-lock.json node_modules dist && cd functions && rm -rf package-lock.json node_modules dist",
    "dev": "vite",
    "emulators:dev": "firebase emulators:exec \"npm run dev\" --project=demo-vueflame --import=./seed/local --export-on-exit --ui --inspect-functions",
    "emulators:stop": "lsof -t -i:4000 -i:4001 -i:5001 -i:5002 -i:5768 -i:8080 -i:8085 -i:9000 -i:9099 -i:9199 -i:9090 | xargs kill -9",
    "build": "run-p type-check \"build-only {@}\" --",
    "prepreview": "npm run build",
    "preview": "vite preview",
    "emulators:preview": "firebase emulators:exec \"npm run preview\" --project=demo-vueflame --import=./seed/local --export-on-exit --ui",
    "test:unit": "vitest",
    "emulators:test:unit": "firebase emulators:exec \"npm run test:unit\" --project=demo-vueflame --import=./seed/unit --inspect-functions",
    "test:e2e": "start-server-and-test preview http://localhost:4173 'cypress run --e2e'",
    "emulators:test:e2e": "firebase emulators:exec \"npm run test:e2e\" --project=demo-vueflame --import=./seed/e2e",
    "test:e2e:dev": "start-server-and-test 'vite dev --port 4173' http://localhost:4173 'cypress open --e2e'",
    "emulators:test:e2e:dev": "firebase emulators:exec \"npm run test:e2e:dev\" --project=demo-vueflame --import=./seed/e2e  --ui --inspect-functions",
    "build-only": "vite build",
    "type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false",
    "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
    "format": "prettier --write src/",
    "export:dev": "npx -p node-firestore-import-export firestore-export -a credentials.dev.json -b backup.dev-$(date \"+%s\")${npm_config_before_import}.json",
    "import:dev": "npm run export:dev --before_import=before_import && npx -p node-firestore-import-export firestore-import -a credentials.dev.json -b ${npm_config_path}",
    "generate-pwa-assets": "npx pwa-asset-generator assets/logo.svg public/icons --favicon --mstile"
  },
  "dependencies": {
    "@vuepic/vue-datepicker": "^7.4.1",
    "firebase": "^10.7.2",
    "pinia": "^2.1.7",
    "vue": "^3.3.7",
    "vue-i18n": "^9.9.0",
    "vue-router": "^4.2.5",
    "vuetify": "^3.5.1"
  },
  "devDependencies": {
    "@intlify/unplugin-vue-i18n": "^1.6.0",
    "@mdi/js": "^7.4.47",
    "@rushstack/eslint-patch": "^1.7.1",
    "@tsconfig/node18": "^18.2.2",
    "@types/jsdom": "^21.1.6",
    "@types/node": "^18.19.9",
    "@vitejs/plugin-vue": "^4.6.2",
    "@vue/eslint-config-prettier": "^8.0.0",
    "@vue/eslint-config-typescript": "^12.0.0",
    "@vue/test-utils": "^2.4.3",
    "@vue/tsconfig": "^0.4.0",
    "cypress": "^13.6.3",
    "eslint": "^8.56.0",
    "eslint-plugin-cypress": "^2.15.1",
    "eslint-plugin-vue": "^9.20.1",
    "firebase-tools": "^12.9.1",
    "jsdom": "^22.1.0",
    "npm-run-all2": "^6.1.1",
    "prettier": "^3.2.4",
    "sass": "^1.70.0",
    "start-server-and-test": "^2.0.3",
    "typescript": "~5.2.2",
    "unplugin-fonts": "^1.1.1",
    "vite": "^4.5.2",
    "vite-plugin-pwa": "^0.16.7",
    "vite-plugin-vuetify": "^1.0.2",
    "vitest": "^0.34.6",
    "vue-tsc": "^1.8.27"
  }
}
```
npm

### Logs

_No response_

### Validations

- [X] Follow our [Code of Conduct](https://github.com/vitejs/vite/blob/main/CODE_OF_CONDUCT.md)
- [X] Read the [Contributing Guidelines](https://github.com/vitejs/vite/blob/main/CONTRIBUTING.md).
- [X] Read the [docs](https://vitejs.dev/guide).
- [X] Check that there isn't [already an issue](https://github.com/vitejs/vite/issues) that reports the same bug to avoid creating a duplicate.
- [X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to [vuejs/core](https://github.com/vuejs/core) instead.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vitejs/vite/discussions) or join our [Discord Chat Server](https://chat.vitejs.dev/).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
sapphi-red commented 9 months ago

Duplicate of #15714

huangjihua commented 9 months ago

The same