declaration of 'server.force' error
See original GitHub issueDescribe the bug
Type ‘{ port: number; fs: { strict: true; }; hmr: true; force: true; }’ cannot be assigned to type ‘ServerOptions’. Object literals can specify only known properties, and ‘force’ is not in type ‘ServerOptions’. ts(2322) index.d.ts(2171, 5): The required type is from the property “server”, which is declared on the “UserConfig” type here
I found that the declaration of ‘server.force’ is under UserConfig, according to the documentation of vite, the declaration of force should be under ServerOptions
Reproduction
https://github.com/asasugar/vite-element-plus-admin
System Info
System:
OS: macOS 12.4
CPU: (8) x64 Intel(R) Core(TM) i5-8257U CPU @ 1.40GHz
Memory: 373.59 MB / 8.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 15.1.0 - ~/.nvm/versions/node/v15.1.0/bin/node
Yarn: 1.22.19 - ~/.yarn/bin/yarn
npm: 6.14.5 - /usr/local/bin/npm
Browsers:
Chrome: 97.0.4692.99
Safari: 15.5
npmPackages:
@vitejs/plugin-legacy: ^1.8.1 => 1.8.1
@vitejs/plugin-vue: ^2.0.0 => 2.3.1
@vitejs/plugin-vue-jsx: ^1.3.10 => 1.3.10
vite: 3.0.0-alpha.7 => 3.0.0-alpha.7
Used Package Manager
pnpm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn’t already an issue that reports the same bug to avoid creating a duplicate.
- 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 https://github.com/vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
TypeScript compiler does not throw error on missing declaration
Compiler does not throw an error to me that I am using undeclared variable a . But if I try to export some...
Read more >PL/SQL RAISE Exceptions By Practical Examples
Learn how to use the PL/SQL RAISE statement to raise a user-defined exception, internally defined exception, and reraising an exception.
Read more >Node.js Error Handling Best Practices: Ship With Confidence
Want to ship your Node.js applications with confidence? Learn Node.js error handling best practices, tips and tricks with our simple guide.
Read more >@@ERROR (Transact-SQL) - SQL Server | Microsoft Learn
Returns an error number if the previous statement encountered an error. If the error was one of the errors in the sys.messages catalog...
Read more >Puppet Duplicate declaration error - Server Fault
i'm running in an Error: Duplicate declaration with my puppet project. I want to deploy jboss instances, and part of them are some...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You are using 3.0.0-alpha.7 which includes a breaking change (#8280). The currently deployed docs are for v2. https://github.com/asasugar/vite-element-plus-admin/blob/af8d61750db480bca88dc784e218e027a1843db4/package.json#L67
Please use
config.force
instead ofconfig.server.force
.@asasugar What is the reason for using
config.force
?