You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run vite build --force it generates the following error:
❯ npx vite build --force
file:///Users/jeff/code/gecko/gecko-app/node_modules/vite/dist/node/cli.js:448
throw new CACError(`Unknown option \`${name.length > 1 ? `--${name}` : `-${name}`}\``);
^
CACError: Unknown option `--force`
at Command.checkUnknownOptions (file:///Users/jeff/code/gecko/gecko-app/node_modules/vite/dist/node/cli.js:448:17)
at CAC.runMatchedCommand (file:///Users/jeff/code/gecko/gecko-app/node_modules/vite/dist/node/cli.js:646:13)
at CAC.parse (file:///Users/jeff/code/gecko/gecko-app/node_modules/vite/dist/node/cli.js:585:12)
at file:///Users/jeff/code/gecko/gecko-app/node_modules/vite/dist/node/cli.js:947:5
at ModuleJob.run (node:internal/modules/esm/module_job:217:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
Node.js v20.9.0
This occurs on both versions 6.3.5 and 5.4.19 (but not on 5.0.8). For what it is worth, the --force flag is still in the documentation online and also appears if you run vite help build... so seems like it ought to work. But I didn't see a bug filed, so was wondering if it was eliminated/renamed and the doc just didn't catch up yet....
--force is a dev-server dependency-optimizer flag, not a vite build option. I reproduced the Unknown option --force error on both Vite 5.4.19 and 6.3.5; vite build --help omits it. Remove --force from the build command.
The CLI docs list --force under the dev server. Also, vite help build launches that server on these versions; use vite build --help to see build options.
--force isn't being removed, it was just never a build flag. It belongs to the dev server: vite dev --force (or vite --force) tells the dep optimizer to ignore the cached pre-bundles in node_modules/.vite and re-bundle.
vite build doesn't use the dep optimizer cache, so there's nothing to force there. If you're seeing stale behavior during dev, run the dev server with --force or rm -rf node_modules/.vite. If the staleness is in build output itself, that's a different cache (dist/ or a plugin's), unrelated to this flag.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
When I run
vite build --forceit generates the following error:This occurs on both versions
6.3.5and5.4.19(but not on5.0.8). For what it is worth, the--forceflag is still in the documentation online and also appears if you runvite help build... so seems like it ought to work. But I didn't see a bug filed, so was wondering if it was eliminated/renamed and the doc just didn't catch up yet....All reactions