前端

高德地图开发的坑

ERROR Failed to compile with 2 errors &n

 ERROR  Failed to compile with 2 errors                                                                                              17:03:29

These dependencies were not found:

* @/services/attendance/statistics.js in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/GaodeMap/index.vue?vue&type=script&lang=js&
* moment in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/GaodeMap/index.vue?vue&type=script&lang=js&

To install them, you can run: npm install --save @/services/attendance/statistics.js moment

 

------------------成功---------------

 WAIT  Compiling...                                                                                                                                                    16:01:38

98% after emitting CopyPlugin

 ERROR  Failed to compile with 1 error                                                                                                                                 16:01:40

This dependency was not found:

* https://webapi.amap.com/maps?v=1.4.15&key=b629f1b0491beedad2bb6e10ece3eb86?vue&type=script&lang=js& in ./src/components/GaodeMap/index.vue

To install it, you can run: npm install --save https://webapi.amap.com/maps?v=1.4.15&key=b629f1b0491beedad2bb6e10ece3eb86?vue&type=script&lang=js&


 WAIT  Compiling...                                                                                                                                                    16:02:01

98% after emitting CopyPlugin

 DONE  Compiled successfully in 2236ms                                                                                                                                 16:02:03


  App running at:
  - Local:   http://localhost:1024/ 
  - Network: http://192.168.41.190:1024/

^C%                                                                                                                                                                            
wangyuqiang@wangyuqiangdeMacBook-Pro base-project-front % npm i @amap/amap-jsapi-loader --save
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: eslint-loader@2.2.1
npm WARN Found: eslint@7.15.0
npm WARN node_modules/eslint
npm WARN   peer eslint@">= 1.6.0" from @vue/cli-plugin-eslint@4.4.6
npm WARN   node_modules/@vue/cli-plugin-eslint
npm WARN     dev @vue/cli-plugin-eslint@"4.4.6" from the root project
npm WARN   4 more (babel-eslint, eslint-plugin-vue, vue-eslint-parser, the root project)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer eslint@">=1.6.0 <7.0.0" from eslint-loader@2.2.1
npm WARN node_modules/@vue/cli-plugin-eslint/node_modules/eslint-loader
npm WARN   eslint-loader@"^2.2.1" from @vue/cli-plugin-eslint@4.4.6
npm WARN   node_modules/@vue/cli-plugin-eslint
npm WARN 
npm WARN Conflicting peer dependency: eslint@6.8.0
npm WARN node_modules/eslint
npm WARN   peer eslint@">=1.6.0 <7.0.0" from eslint-loader@2.2.1
npm WARN   node_modules/@vue/cli-plugin-eslint/node_modules/eslint-loader
npm WARN     eslint-loader@"^2.2.1" from @vue/cli-plugin-eslint@4.4.6
npm WARN     node_modules/@vue/cli-plugin-eslint
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@achrinza/node-ipc@9.2.2',
npm WARN EBADENGINE   required: { node: '8 || 10 || 12 || 14 || 16 || 17' },
npm WARN EBADENGINE   current: { node: 'v18.18.0', npm: '8.11.0' }
npm WARN EBADENGINE }
(#########⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠹ idealTree: timing idealTree Completed in 2206ms
(#########⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠹ idealTree: timing idealTree Completed in 2206ms
(#########⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠹ idealTree: timing idealTree Completed in 2206ms
(#########⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠹ idealTree: timing idealTree Completed in 2206ms
(#########⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠹ idealTree: timing idealTree Completed in 2206ms
(#########⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠹ idealTree: timing idealTree Completed in 2206ms

wangyuqiang@wangyuqiangdeMacBook-Pro base-project-front % npm run dev                         

> ruoyi@3.6.2 dev
> set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve

 INFO  Starting development server...
98% after emitting CopyPlugin

 ERROR  Failed to compile with 1 error                                                                                                                                 16:06:30

This dependency was not found:

* moment in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/GaodeMap/index.vue?vue&type=script&lang=js&

To install it, you can run: npm install --save moment
^C%                                                                                                                                                                            
wangyuqiang@wangyuqiangdeMacBook-Pro base-project-front % npm install --save moment
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: eslint-loader@2.2.1
npm WARN Found: eslint@7.15.0
npm WARN node_modules/eslint
npm WARN   peer eslint@">= 1.6.0" from @vue/cli-plugin-eslint@4.4.6
npm WARN   node_modules/@vue/cli-plugin-eslint
npm WARN     dev @vue/cli-plugin-eslint@"4.4.6" from the root project
npm WARN   4 more (babel-eslint, eslint-plugin-vue, vue-eslint-parser, the root project)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer eslint@">=1.6.0 <7.0.0" from eslint-loader@2.2.1
npm WARN node_modules/@vue/cli-plugin-eslint/node_modules/eslint-loader
npm WARN   eslint-loader@"^2.2.1" from @vue/cli-plugin-eslint@4.4.6
npm WARN   node_modules/@vue/cli-plugin-eslint
npm WARN 
npm WARN Conflicting peer dependency: eslint@6.8.0
npm WARN node_modules/eslint
npm WARN   peer eslint@">=1.6.0 <7.0.0" from eslint-loader@2.2.1
npm WARN   node_modules/@vue/cli-plugin-eslint/node_modules/eslint-loader
npm WARN     eslint-loader@"^2.2.1" from @vue/cli-plugin-eslint@4.4.6
npm WARN     node_modules/@vue/cli-plugin-eslint
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@achrinza/node-ipc@9.2.2',
npm WARN EBADENGINE   required: { node: '8 || 10 || 12 || 14 || 16 || 17' },
npm WARN EBADENGINE   current: { node: 'v18.18.0', npm: '8.11.0' }
npm WARN EBADENGINE }
(##################) ⠋ reify:moment: sill audit bulk request {

added 1 package in 2m
wangyuqiang@wangyuqiangdeMacBook-Pro base-project-front % 
wangyuqiang@wangyuqiangdeMacBook-Pro base-project-front % npm i @amap/amap-jsapi-loader --save
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: eslint-loader@2.2.1
npm WARN Found: eslint@7.15.0
npm WARN node_modules/eslint
npm WARN   peer eslint@">= 1.6.0" from @vue/cli-plugin-eslint@4.4.6
npm WARN   node_modules/@vue/cli-plugin-eslint
npm WARN     dev @vue/cli-plugin-eslint@"4.4.6" from the root project
npm WARN   4 more (babel-eslint, eslint-plugin-vue, vue-eslint-parser, the root project)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer eslint@">=1.6.0 <7.0.0" from eslint-loader@2.2.1
npm WARN node_modules/@vue/cli-plugin-eslint/node_modules/eslint-loader
npm WARN   eslint-loader@"^2.2.1" from @vue/cli-plugin-eslint@4.4.6
npm WARN   node_modules/@vue/cli-plugin-eslint
npm WARN 
npm WARN Conflicting peer dependency: eslint@6.8.0
npm WARN node_modules/eslint
npm WARN   peer eslint@">=1.6.0 <7.0.0" from eslint-loader@2.2.1
npm WARN   node_modules/@vue/cli-plugin-eslint/node_modules/eslint-loader
npm WARN     eslint-loader@"^2.2.1" from @vue/cli-plugin-eslint@4.4.6
npm WARN     node_modules/@vue/cli-plugin-eslint
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@achrinza/node-ipc@9.2.2',
npm WARN EBADENGINE   required: { node: '8 || 10 || 12 || 14 || 16 || 17' },
npm WARN EBADENGINE   current: { node: 'v18.18.0', npm: '8.11.0' }
npm WARN EBADENGINE }
(#########⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠏ idealTree: timing idealTree Completed in 1975ms

up to date in 2m

输入命令后耐心等待,虽有卡顿,程序总能自渡。。。。。。

最终实现效果: