mst*_*std 5 javascript ubuntu vue.js vuejs2 vuejs3
我想迁移到 vuejs 3 并尝试创建新的 vuejs 3 应用程序,但\n出现找不到 vue 的错误。我愿意 :
\n$ npm -version\n6.14.8\n$ nodejs --version\nv14.12.0\n$ cd ../\n$ yarn global add @vue/cli\nyarn global v1.22.5\n[1/4] Resolving packages...\nwarning @vue/cli > @vue/cli-shared-utils > @hapi/joi@15.1.1: joi is leaving the @hapi organization and moving back to 'joi' (https://github.com/sideway/joi/issues/2411)\nwarning @vue/cli > @vue/cli-shared-utils > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142\nwarning @vue/cli > @vue/cli-shared-utils > @hapi/joi > @hapi/address@2.1.4: This version has been deprecated and is no longer supported or maintained\nwarning @vue/cli > @vue/cli-shared-utils > @hapi/joi > @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained\nwarning @vue/cli > @vue/cli-shared-utils > @hapi/joi > @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained\nwarning @vue/cli > @vue/cli-shared-utils > @hapi/joi > @hapi/topo > @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained\nwarning @vue/cli > @vue/cli-shared-utils > request > har-validator@5.1.5: this library is no longer supported\nwarning @vue/cli > @vue/cli-shared-utils > @hapi/joi > @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained\nwarning @vue/cli > @vue/cli-ui > vue-cli-plugin-apollo > nodemon > chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.\nwarning @vue/cli > @vue/cli-ui > vue-cli-plugin-apollo > nodemon > chokidar > fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.\nwarning @vue/cli > globby > fast-glob > micromatch > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated\nwarning @vue/cli > globby > fast-glob > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated\n[2/4] Fetching packages...\ninfo fsevents@1.2.13: The platform "linux" is incompatible with this module.\ninfo "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.\n[3/4] Linking dependencies...\n[4/4] Building fresh packages...\nsuccess Installed "@vue/cli@4.5.8" with binaries:\n- vue\nDone in 26.33s.\n$ vue --version\n\nCommand 'vue' not found, but can be installed with:\n\nsudo snap install vue\n\n$ vue create V3Y\n\nCommand 'vue' not found, but can be installed with:\n\nsudo snap install vue\n
Run Code Online (Sandbox Code Playgroud)\n我大约一个月前重新安装了 kubuntu 18,并一直在使用之前创建的 vuejs2 应用程序。\n但我没有创建任何新的 vuejs 应用程序,想知道是否提到了 iif
\n我认为上面安装 vue 的命令是错误的命令。
\n我的操作系统是否配置错误?
\n编辑: \n我发现有用的命令:\n$ export PATH="$(yarn global bin):$PATH"\n但是使用所选选项创建新应用程序:\n\xe2\x9d\xaf 默认(Vue 3 预览版)([ Vue 3] babel,eslint)\n\xe2\x9d\xaf 纱线:
\n我在控制台中收到错误:
\nVue CLI v4.5.8\nFailed to check for updates\n\xe2\x9c\xa8 Creating project in /mnt/_work_sdb8/wwwroot/lar/VApps/v3y.\n Initializing git repository...\n\xe2\x9a\x99\xef\xb8\x8f Installing CLI plugins. This might take a while...\n\n00h00m00s 0/0: : ERROR Error: Command failed: yarn config get npmRegistryServer\nERROR: [Errno 2] No such file or directory: 'config'\n\n\nError: Command failed: yarn config get npmRegistryServer\nERROR: [Errno 2] No such file or directory: 'config'\n\n\n at makeError (/home/serge/.config/yarn/global/node_modules/execa/index.js:174:9)\n at /home/serge/.config/yarn/global/node_modules/execa/index.js:278:16\n at processTicksAndRejections (internal/process/task_queues.js:93:5)\n at async PackageManager.getRegistry (/home/serge/.config/yarn/global/node_modules/@vue/cli/lib/util/ProjectPackageManager.js:194:21)\n at async PackageManager.setRegistryEnvs (/home/serge/.config/yarn/global/node_modules/@vue/cli/lib/util/ProjectPackageManager.js:235:22)\n at async PackageManager.runCommand (/home/serge/.config/yarn/global/node_modules/@vue/cli/lib/util/ProjectPackageManager.js:336:5)\n at async PackageManager.install (/home/serge/.config/yarn/global/node_modules/@vue/cli/lib/util/ProjectPackageManager.js:381:12)\n at async Creator.create (/home/serge/.config/yarn/global/node_modules/@vue/cli/lib/Creator.js:216:7)\n at async create (/home/serge/.config/yarn/global/node_modules/@vue/cli/lib/create.js:72:3)\n
Run Code Online (Sandbox Code Playgroud)\n我的操作系统中有一些错误的配置?
\n谢谢!
\n小智 4
设置这个path
:
export PATH="$HOME/.yarn/bin:$PATH"
Run Code Online (Sandbox Code Playgroud)
然后,您可以使用vue
: