V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
KillThunder
V2EX  ›  问与答

element-ui 启动失败

  •  
  •   KillThunder · 2019-10-29 13:38:05 +08:00 · 3020 次点击
    这是一个创建于 1850 天前的主题,其中的信息可能已经有所发展或是发生改变。

    element-ui 使用 npm run dev 启动失败;错误信息是: PS C:\workspase\web> npm run dev

    [email protected] dev C:\workspase\web vue-cli-service serve

    INFO Starting development server... 10% building 2/2 modules 0 active ERROR SyntaxError: Cannot use import statement outside a module C:\workspase\web\mock\index.js:1 import "core-js/modules/es6.regexp.constructor"; at Server.setupAfterFeature (C:\workspase\web\node_modules\webpack-dev-server\lib\Server.js:439:18) at Object.after (C:\workspase\web\node_modules\webpack-dev-server\lib\Server.js:499:16) at C:\workspase\web\node_modules\webpack-dev-server\lib\Server.js:558:24 at Array.forEach (<anonymous>) at Server.setupFeatures (C:\workspase\web\node_modules\webpack-dev-server\lib\Server.js:557:49) at new Server (C:\workspase\web\node_modules\webpack-dev-server\lib\Server.js:133:10) 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. 有大神遇到过这个问题吗?求解答</anonymous>

    1 条回复    2019-10-29 15:17:10 +08:00
    arrow8899
        1
    arrow8899  
       2019-10-29 15:17:10 +08:00
    升级下 nodejs 版本
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5001 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 03:49 · PVG 11:49 · LAX 19:49 · JFK 22:49
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.