账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    vue-cli运行报错?
    21
    0
    #
    # Fatal error in , line 0
    # Check failed: U_SUCCESS(status).
    #
    #
    #
    #FailureMessage Object: 000000F970CFD490npm ERR! code ELIFECYCLE
    npm ERR! errno 3221225477
    npm ERR! newx@0.1.0 serve: `vue-cli-service serve`
    npm ERR! Exit status 3221225477
    npm ERR!
    npm ERR! Failed at the newx@0.1.0 serve script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

    详细log

    0 info it worked if it ends with ok
    1 verbose cli [
    1 verbose cli   'D:\\nodejs\\node.exe',
    1 verbose cli   'D:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
    1 verbose cli   'run',
    1 verbose cli   'serve'
    1 verbose cli ]
    2 info using npm@6.9.0
    3 info using node@v12.0.0
    4 verbose run-script [ 'preserve', 'serve', 'postserve' ]
    5 info lifecycle newx@0.1.0~preserve: newx@0.1.0
    6 info lifecycle newx@0.1.0~serve: newx@0.1.0
    7 verbose lifecycle newx@0.1.0~serve: unsafe-perm in lifecycle true
    8 verbose lifecycle newx@0.1.0~serve: PATH: D:\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\newx\node_modules\.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\software\apache-maven-3.6.0\bin\;D:\工作软件\HBuilderX\plugins\launcher\tools\adbs;;;D:\工作软件\Git\cmd;C:\Program Files\TortoiseSVN\bin;D:\nodejs\;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Users\Administrator\AppData\Roaming\npm
    9 verbose lifecycle newx@0.1.0~serve: CWD: D:\newx
    10 silly lifecycle newx@0.1.0~serve: Args: [ '/d /s /c', 'vue-cli-service serve' ]
    11 silly lifecycle newx@0.1.0~serve: Returned: code: 3221225477  signal: null
    12 info lifecycle newx@0.1.0~serve: Failed to exec serve script
    13 verbose stack Error: newx@0.1.0 serve: `vue-cli-service serve`
    13 verbose stack Exit status 3221225477
    13 verbose stack     at EventEmitter.<anonymous> (D:\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
    13 verbose stack     at EventEmitter.emit (events.js:196:13)
    13 verbose stack     at ChildProcess.<anonymous> (D:\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
    13 verbose stack     at ChildProcess.emit (events.js:196:13)
    13 verbose stack     at maybeClose (internal/child_process.js:1000:16)
    13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:267:5)
    14 verbose pkgid newx@0.1.0
    15 verbose cwd D:\newx
    16 verbose Windows_NT 10.0.17763
    17 verbose argv "D:\\nodejs\\node.exe" "D:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "serve"
    18 verbose node v12.0.0
    19 verbose npm  v6.9.0
    20 error code ELIFECYCLE
    21 error errno 3221225477
    22 error newx@0.1.0 serve: `vue-cli-service serve`
    22 error Exit status 3221225477
    23 error Failed at the newx@0.1.0 serve script.
    23 error This is probably not a problem with npm. There is likely additional logging output above.
    24 verbose exit [ 3221225477, true ]
    

    请问应该怎么解决?

    0
    打赏
    收藏
    点击回答
    您的回答被采纳后将获得:提问者悬赏的 10 元积分
        全部回答
    • 0
    • SSD 普通会员 1楼

      在使用Vue CLI进行项目开发时,可能会遇到各种错误。以下是一些可能的错误及其解决方法:

      1. npm install --save-dev vite 错误:Vite可能需要一个或多个依赖项才能正常工作。尝试安装所有必要的依赖项,或者重新安装Vite。

      2. npm installyarn add 错误:如果依赖项没有正确安装,那么你将无法使用它们。检查你的package.json文件,确保所有依赖项都有正确的版本号。

      3. TypeError: Cannot read property 'length' of undefined:如果Vite尝试获取某个对象的长度,但对象是undefined,那么就会出现这个错误。检查你的代码,确保Vite没有尝试访问undefined对象的length属性。

      4. Error: Cannot find module:如果你的项目中没有引入某个依赖项,那么Vite可能无法找到它。检查你的package.json文件,确保所有依赖项都有正确的版本号,并确保你的项目中已经引入了这些依赖项。

      5. vite buildvite run dev 错误:如果Vite试图构建或运行项目,但没有正确配置,那么就会出现这个错误。检查你的package.json文件,确保你的项目是vite启动的,并确保你的vite.config.js文件正确设置了相关选项。

      6. ReferenceError: Cannot read property 'length' of undefined:如果你的项目中没有导入某个对象的length属性,那么Vite可能无法找到它。检查你的代码,确保Vite没有尝试访问undefined对象的length属性。

      以上就是一些可能的Vue CLI运行错误及其解决方法。如果你遇到其他错误,建议你查阅Vue CLI的官方文档或者向社区寻求帮助。

    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部