bug:The following dependencies are imported but could not be resolved lib-flexibleflexible

ivyone@ivyonedeMacBook-Pro daily-cost % npm run dev

> [email protected] dev /Users/ivyone/hami94/daily-cost
> vite

 > src/router/index.js:3:17: error: Could not resolve "../views/Data.vue"
    3 │ import Data from "../views/Data.vue";
      ?                  ~~~~~~~~~~~~~~~~~~~

error when starting dev server:
Error: Build failed with 1 error:
src/router/index.js:3:17: error: Could not resolve "../views/Data.vue"
    at failureErrorWithLog (/Users/ivyone/hami94/daily-cost/node_modules/esbuild/lib/main.js:1160:15)
    at buildResponseToResult (/Users/ivyone/hami94/daily-cost/node_modules/esbuild/lib/main.js:896:32)
    at /Users/ivyone/hami94/daily-cost/node_modules/esbuild/lib/main.js:991:20
    at /Users/ivyone/hami94/daily-cost/node_modules/esbuild/lib/main.js:542:9
    at handleIncomingPacket (/Users/ivyone/hami94/daily-cost/node_modules/esbuild/lib/main.js:631:9)
    at Socket.readFromStdout (/Users/ivyone/hami94/daily-cost/node_modules/esbuild/lib/main.js:509:7)
    at Socket.emit (events.js:315:20)
    at addChunk (internal/streams/readable.js:309:12)
    at readableAddChunk (internal/streams/readable.js:284:9)
    at Socket.Readable.push (internal/streams/readable.js:223:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: `vite`
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!     /Users/ivyone/.npm/_logs/2021-03-12T00_05_38_519Z-debug.log
ivyone@ivyonedeMacBook-Pro daily-cost % npm run dev

> [email protected] dev /Users/ivyone/hami94/daily-cost
> vite

error when starting dev server:
Error: The following dependencies are imported but could not be resolved:

  lib-flexible/flexible (imported by /Users/ivyone/hami94/daily-cost/src/main.js)

Are they installed?
    at optimizeDeps (/Users/ivyone/hami94/daily-cost/node_modules/vite/dist/node/chunks/dep-e0f09032.js:67754:15)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async runOptimize (/Users/ivyone/hami94/daily-cost/node_modules/vite/dist/node/chunks/dep-e0f09032.js:68328:48)
    at async Server.httpServer.listen (/Users/ivyone/hami94/daily-cost/node_modules/vite/dist/node/chunks/dep-e0f09032.js:68342:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: `vite`
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!     /Users/ivyone/.npm/_logs/2021-03-12T00_06_46_494Z-debug.log
ivyone@ivyonedeMacBook-Pro daily-cost % npm install lib-flexible --save-dev

npm notice save lib-flexible is being moved from dependencies to devDependencies
npm WARN [email protected] requires a peer of webpack@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.

+ [email protected]
added 1 package in 2.762s

5 packages are looking for funding
  run `npm fund` for details

ivyone@ivyonedeMacBook-Pro daily-cost % npm run dev

> [email protected] dev /Users/ivyone/hami94/daily-cost
> vite

Pre-bundling dependencies:
  vue
  lib-flexible/flexible
  vant
  vue-router
(this will be run only when your dependencies or config have changed)

  vite v2.0.5 dev server running at:

  > Local:    http://localhost:3000/
  > Network:  http://192.168.3.11:3000/

  ready in 981ms.

解决方法:
安装lib-flexible

npm install lib-flexible --save-dev

你可能感兴趣的:(前端,html,spring,boot,java,spring)