vue-cli3.0 创建项目报错。求教~~

图片描述

上面的警告是node和npm版本问题,试着解决了下,还是提示警告信息。

下面的error试着用网上的解决办法处理了"useTaobaoRegistry": false,原来是true。可是还是不行。

{
  "useTaobaoRegistry": false,
  "presets": {
    "myproject": {
      "useConfigFiles": true,
      "plugins": {
        "@vue/cli-plugin-babel": {},
        "@vue/cli-plugin-eslint": {
          "config": "standard",
          "lintOn": [
            "save"
          ]
        }
      },
      "router": true,
      "routerHistoryMode": false,
      "vuex": true,
      "cssPreprocessor": "sass"
    }
  }
}

终端内的代码

Vue CLI v3.2.1
✨  Creating project in /Users/cff/Desktop/vue-test.
⚙  Installing CLI plugins. This might take a while...

WARNING: You are likely using a version of node-tar or npm that is incompatible with this version of Node.js.
Please use either the version of npm that is bundled with Node.js, or a version of npm (> 5.5.1 or < 5.4.0) or node-tar (> 4.0.1) that is compatible with Node.js 9 and above.
npm[7413]: ../src/node_zlib.cc:441:static void node::(anonymous namespace)::ZCtx::Init(const FunctionCallbackInfo<v8::Value> &): Assertion `args.Length() == 7 && "init(windowBits, level, memLevel, strategy, writeResult, writeCallback," " dictionary)"' failed.
 1: 0x10003ae75 node::Abort() [/usr/local/bin/node]
 2: 0x100039ed3 node::AddEnvironmentCleanupHook(v8::Isolate*, void (*)(void*), void*) [/usr/local/bin/node]
 3: 0x1000d2f0d node::(anonymous namespace)::ZCtx::Init(v8::FunctionCallbackInfo<v8::Value> const&) [/usr/local/bin/node]
 4: 0x10023035f v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) [/usr/local/bin/node]
 5: 0x10022f8a1 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/usr/local/bin/node]
 6: 0x10022ef40 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/usr/local/bin/node]
 7: 0x378fd76dbe3d 
 8: 0x378fd76918d5 
 9: 0x378fd768d02f 
 ERROR  command failed: npm install --loglevel error
[cff@panda ~/Desktop]$
阅读 3k
1 个回答

错误都看不清楚,你的图能不能清晰一点。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进