An error will be reported when the iview-admin project is moved to another directory

scaffolding downloaded from Github, decompressed and executed after download:

npm install
npm run dev

the completion is normal and can be compiled and run normally.

but putting this directory under my project and then executing it will report an error:

 ERROR  Failed to compile with 1 errors                                                                                         10:06:38

 error  in ./src/router/routers.js

Syntax Error: 
  20 |       hideInMenu: true
  21 |     },
> 22 |     component: () => import("@/view/login/login.vue")
     |                      ^
  23 |   },
  24 |   {
  25 |     path: "/",

Add @babel/plugin-syntax-dynamic-import (https://git.io/vb4Sv) to the "plugins" section of your Babel config to enable parsing.


 @ ./src/router/index.js 3:0-31 9:2-8 35:42-48
 @ ./src/main.js
 @ multi (webpack)-dev-server/client/index.js (webpack)/hot/dev-server.js ./src/main.js

try to find that some directories go wrong and some don"t. It is not clear exactly what caused the problem. Does it have anything to do with the length of the directory?

Local is the Mac OSX system, and nodejs is version 8.11.0.

Apr.02,2021

you need to configure @ babel/plugin-syntax-dynamic-import, the babel plug-in


finally found out that several hidden files in the root directory were not copied.

clipboard.png

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e49798-44578.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e49798-44578.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?