The vue-admin-element project suddenly couldn't get up
INFO Starting development server...
ERROR WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- should be a string.
WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- should be a string.
-> Name of the configuration. Used when loading multiple configurations.
at webpack (E:\qdyh\trunk\qdyh-web\node_modules\webpack\lib\:31:9)
at serve (E:\qdyh\trunk\qdyh-web\node_modules\@vue\cli-service\lib\commands\:135:22)
at (internal/modules/cjs/:834:11)
at startup (internal/bootstrap/:283:19)
at bootstrapNodeJSCore (internal/bootstrap/:622:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\hyx\AppData\Roaming\npm-cache\_logs\2020-04-28T08_05_55_780Z
PS E:\qdyh\trunk\qdyh-web> npm i
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
If your project has nothing changed and the above error suddenly reports when starting, it may be that there is some problem with the environment. At this time, you can delete node_modules and reinstall it. At this time, you can solve npm WARN [email protected] No repository field. This warning is solved.
The solution is as follows
npm WARN XXXXXXXX No repository field.
This is because deleting the node_modules file causes the previous contact with the code repository to disappear. There are two solutions
1. Set the project to private
Add in
"private": true
2. Just add the warehouse address of the project
"repository": { "type": "git", "url": "" }
The above is personal experience. I hope you can give you a reference and I hope you can support me more.