Vue Native Script不想安装

Vue Native Script don't want to install

我想使用vue-native,我只需要通过npm安装vue-native-scripts,但它不想这样做

PS E:\Coding\VueNative\YAAdmin> npm i vue-native-scripts

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! path E:\Coding\VueNative\YAAdmin\node_modules\vue-native-scripts\src\bin\vue-native-script.js
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod 'E:\Coding\VueNative\YAAdmin\node_modules\vue-native-scripts\src\bin\vue-native-script.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Илья\AppData\Roaming\npm-cache\_logs19-08-10T11_41_00_816Z-debug.log

我已经尝试手动安装所有依赖项,但它不起作用。

解决方案:

  1. 安装纱线:npm install yarn -g
  2. 在你的项目目录下运行yarn add native-vue-scripts

就这些

你可以做到这一点

用于使用 vue-cli (2.x) 快速制作原型的 NativeScript-Vue 应用程序模板。

yarn global add @vue/cli @vue/cli-init
vue init nativescript-vue/vue-cli-template <project-name>
cd <project-name>