我想使用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\_logs\2019-08-10T11_41_00_816Z-debug.log
我尝试手动安装所有依赖项,但不起作用。
答案 0 :(得分:0)
解决方案:
npm install yarn -g
yarn add native-vue-scripts
就这样
答案 1 :(得分:0)
你可以这样做
NativeScript-Vue 应用程序模板,用于使用 vue-cli (2.x) 进行快速原型设计。
yarn global add @vue/cli @vue/cli-init
vue init nativescript-vue/vue-cli-template <project-name>
cd <project-name>