【发布时间】:2021-02-05 13:17:28
【问题描述】:
我想迁移到 vuejs 3 并尝试创建新的 vuejs 3 应用程序和 出现未找到 vue 的错误。我愿意:
$ npm -version
6.14.8
$ nodejs --version
v14.12.0
$ cd ../
$ yarn global add @vue/cli
yarn global v1.22.5
[1/4] Resolving packages...
warning @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)
warning @vue/cli > @vue/cli-shared-utils > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning @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
warning @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
warning @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
warning @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
warning @vue/cli > @vue/cli-shared-utils > request > har-validator@5.1.5: this library is no longer supported
warning @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
warning @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.
warning @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.
warning @vue/cli > globby > fast-glob > micromatch > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
warning @vue/cli > globby > fast-glob > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
[2/4] Fetching packages...
info fsevents@1.2.13: The platform "linux" is incompatible with this module.
info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "@vue/cli@4.5.8" with binaries:
- vue
Done in 26.33s.
$ vue --version
Command 'vue' not found, but can be installed with:
sudo snap install vue
$ vue create V3Y
Command 'vue' not found, but can be installed with:
sudo snap install vue
大约一个月前,我重新安装了我的 kubuntu 18,并且一直在使用之前创建的 vuejs2 应用程序。 但是我没有创建任何新的 vuejs 应用程序并且想知道是否提到了
我想上面安装vue的命令是错误的命令。
我的操作系统是否配置错误?
已编辑: 我发现有用的命令: $ export PATH="$(yarn global bin):$PATH" 但创建新应用程序并选择选项: ❯ 默认(Vue 3 预览版)([Vue 3] babel、eslint) ❯ 纱线:
我在控制台中遇到错误:
Vue CLI v4.5.8
Failed to check for updates
✨ Creating project in /mnt/_work_sdb8/wwwroot/lar/VApps/v3y.
???? Initializing git repository...
⚙️ Installing CLI plugins. This might take a while...
00h00m00s 0/0: : ERROR Error: Command failed: yarn config get npmRegistryServer
ERROR: [Errno 2] No such file or directory: 'config'
Error: Command failed: yarn config get npmRegistryServer
ERROR: [Errno 2] No such file or directory: 'config'
at makeError (/home/serge/.config/yarn/global/node_modules/execa/index.js:174:9)
at /home/serge/.config/yarn/global/node_modules/execa/index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async PackageManager.getRegistry (/home/serge/.config/yarn/global/node_modules/@vue/cli/lib/util/ProjectPackageManager.js:194:21)
at async PackageManager.setRegistryEnvs (/home/serge/.config/yarn/global/node_modules/@vue/cli/lib/util/ProjectPackageManager.js:235:22)
at async PackageManager.runCommand (/home/serge/.config/yarn/global/node_modules/@vue/cli/lib/util/ProjectPackageManager.js:336:5)
at async PackageManager.install (/home/serge/.config/yarn/global/node_modules/@vue/cli/lib/util/ProjectPackageManager.js:381:12)
at async Creator.create (/home/serge/.config/yarn/global/node_modules/@vue/cli/lib/Creator.js:216:7)
at async create (/home/serge/.config/yarn/global/node_modules/@vue/cli/lib/create.js:72:3)
我的操作系统中有一些错误的配置?
谢谢!
【问题讨论】:
标签: javascript vue.js ubuntu vuejs2 vuejs3