我想用vue js开始一个移动应用程序.任何人都可以建议我可以在vue-native或nativescript-vue之间选择哪个框架?
有什么办法可以将像https://github.com/archriss/react-native-snap-carousel/tree/master/example这样的 react native 组件与 vue native结合起来?
我有一个 vue-native 项目,想在其中使用 react-native 组件,但我有一个我不明白的错误:控制台说: Invariant Violation: expected a string (for built-in components) or a class/function (for composite components) but got: undefined
<template>
<nb-container>
<nb-content>
<carousel
:data="similarEventsData"
:renderItem="_renderItem"
:sliderWidth="sliderWidth"
:itemWidth="itemWidth"
:inactiveSlideScale="0.95"
:inactiveSlideOpacity="1"
:enableMomentum="true"
:activeSlideAlignment="'start'"
:containerCustomStyle="stylesObj.slider"
:contentContainerCustomStyle="stylesObj.sliderContentContainer"
:activeAnimationType="'spring'"
:activeAnimationOptions="{ friction: 4, tension: 40 }"
/>
</nb-content>
</nb-container>
</template>
<script>
import { Dimensions, Platform, Share } from "react-native";
import Carousel from 'react-native-snap-carousel';
import { scrollInterpolators, animatedStyles } from '../../utils/animations';
const { width: viewportWidth, height: …
Run Code Online (Sandbox Code Playgroud) 我正在用 expo 制作一个 vue 原生应用程序。升级到 expo 版本 33 时,出现以下错误“无法从“node_modules/expo/AppEntry.js”解析“../../App””。需要升级到版本 33 是因为我需要 expo 文件系统模块。
我已经从头开始创建了一个新项目,但仍然出现同样的错误。
包.json
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"expo": "^33.0.0",
"global": "^4.4.0",
"react": "16.8.3",
"react-dom": "^16.8.6",
"react-native": "https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz",
"react-native-cli": "^2.0.1",
"react-native-web": "^0.11.4",
"vue-native-core": "0.0.8",
"vue-native-helper": "0.0.11"
},
"devDependencies": {
"@babel/core": "^7.0.0-0",
"babel-preset-expo": "^5.1.1",
"vue-native-scripts": "0.0.16"
},
"private": true
}
Run Code Online (Sandbox Code Playgroud) 我已经制作了几个Nuxt RND(通用和 spa)应用程序。现在我想把这些应用程序变成原生移动应用程序。Vue native 是一种选择,但我只想在 SSR 模式下保持一切正常
请给我您宝贵的建议
谢谢大家,提前谢谢:)
创建的helloworld
项目参考https://vue-native.io/docs/installation.html#Setup-with-Vue-Native-Cli
但是出现以下错误,并且我的第一个应用程序无法启动。
Unable to resolve "../../App" from "node_modules/expo/AppEntry.js"
Run Code Online (Sandbox Code Playgroud)
我的环境
$ node -v
v9.9.0
$ npm -v
6.4.1
$ npm list --depth=0
empty-project-template@ /Users/kamo/repo/github.com/kamontia/vue-
native-app/helloworld
??? babel-preset-expo@5.0.0
??? expo@31.0.4
??? react@16.5.0
??? react-native@0.57.1
??? vue-native-core@0.0.8
??? vue-native-helper@0.0.9
??? vue-native-scripts@0.0.14
npm ERR! peer dep missing: react@16.0.0-alpha.6, required by react-
native-reanimated@1.0.0-alpha.10
npm ERR! peer dep missing: react-native@^0.44.1, required by react-
native-reanimated@1.0.0-alpha.10
Run Code Online (Sandbox Code Playgroud)
在模拟器上
Unable to resolve module ../../App from
xxx/node_modules/expo/AppEntery.js: The ./../App could not be found
from ...
Indeed, none of …
Run Code Online (Sandbox Code Playgroud) 我完成了vue-native的安装的第一个过程,并且正在遵循“入门” Hello world教程(https://vue-native.io/getting-started.html),但是App.vue
永远不会执行的App.js
。如果删除,App.js
则会出现错误:
“无法从“ node_modules \ expo \ AppEntry.js”解析“ ../../App””
如何解决此问题以使其正常运行,并在遇到任何问题时遵循本教程?
资料夹结构:
App.js
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
export default class App extends React.Component {
render() {
return (
<View style={styles.container}>
<Text>Open up App.js to start working on your app!</Text>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
Run Code Online (Sandbox Code Playgroud)
应用程序
<template>
<view class="container">
<text …
Run Code Online (Sandbox Code Playgroud) 我无法用 expo 打开我的 vue 文件。它给出了 AppEntry.js 错误。问题出在 AppEntry.js 文件中,我的 vue 文件没有看到,所以它给出了错误。我找不到如何添加 .vue 扩展名。我需要帮助家伙这个错误让我发疯。
我更新了我的 expo-cli 和 vue-native-cli,并使用了 node 10.6.1 版本。
import { registerRootComponent } from 'expo';
import { activateKeepAwake } from 'expo-keep-awake';
import App from "../../App" // The problem part is here. AppEntry doesnt accept .vue file I cant even see it.
if (__DEV__
)
{
activateKeepAwake();
}
registerRootComponent(App);
Run Code Online (Sandbox Code Playgroud)
也在同一个地方
"sideEffects":
[
"*.fx.js",
"*.fx.web.js"
],
Run Code Online (Sandbox Code Playgroud)
我试图在这里添加 .vue ,但它对我不起作用。如果你让我解决这个问题,我们必须添加一个代码,它提供 AppEntry.js 来读取 .vue 扩展。
我希望看到 App.vue 页面,但出现 AppEntry.js 错误。
我正在尝试:
vue-native init test-project
我得到了这个输出:
使用全局安装的 expo-cli 3.0.10
创建 Vue Native 项目 project-new
[09:09:29] --name:在非交互模式下需要参数。? 使用 expo-cli 创建项目
(node:9072) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, chdir 'project-new' at process.chdir (internal/process/main_thread_only.js:31:12) at installPackages (C:\Users\User\ AppData\Roaming\npm\node_modules\vue-native-cli\src\index.js:182:11) 在 createExpoProject (C:\Users\User\AppData\Roaming\npm\node_modules\vue-native-cli\src\ index.js:123:3) 在 init (C:\Users\User\AppData\Roaming\npm\node_modules\vue-native-cli\src\index.js:101:5) 在命令。(C:\Users\User\AppData\Roaming\npm\node_modules\vue-native-cli\src\index.js:69:7) 在 Command.listener (C:\Users\User\AppData\Roaming\npm\ node_modules\vue-native-cli\node_modules\commander\index.js:315:8) at Command.emit (events.js:182:13) at Command.parseArgs (C: \Users\User\AppData\Roaming\npm\node_modules\vue-native-cli\node_modules\commander\index.js:651:12) 在 Command.parse (C:\Users\User\AppData\Roaming\npm\node_modules \vue-native-cli\node_modules\commander\index.js:474:21) 在 Object. (C:\Users\User\AppData\Roaming\npm\node_modules\vue-native-cli\src\index.js:81:9) (node:9072) UnhandledPromiseRejectionWarning:未处理的承诺拒绝。这个错误要么是因为在没有 catch 块的情况下抛出了异步函数,要么是因为拒绝了一个没有用 .catch() 处理过的承诺。(rejection id: 1) (node:9072) [DEP0018] DeprecationWarning:不推荐使用未处理的承诺拒绝。将来,未处理的承诺拒绝将使用非零退出代码终止 Node.js 进程。\Users\User\AppData\Roaming\npm\node_modules\vue-native-cli\node_modules\commander\index.js:474:21) 在 Object. …
Nuxt 很棒,我清楚地了解它解决的问题。
如果需要基于 Nuxt 的 SPA 以及本机 ios/android 版本,是否意味着您必须处理 2 个不同的代码库并且无法将生成的 SPA 打包为 Vue 本机应用程序?
我正在尝试使用 vue-native-cli 制作 webview 应用程序
我正在尝试在文档的帮助下使用 web 视图组件
这是我的页面
<template>
<web-view
:source="'https://google.com'"
:style="{marginTop: 20}"
/>
</template>
<script>
export default {
methods: {
}
}
</script>
<style>
</style>
Run Code Online (Sandbox Code Playgroud)
当我使用
<view class="text-container">
<text>Hello World</text>
</view>
Run Code Online (Sandbox Code Playgroud)
它工作正常,但在 webview 中
不变律:元素类型无效
我已经创建了一个 vue-native 应用程序,需要收集 IOS 和 Android 的 Bundle ID,但无法在 Xcode 中打开我的项目。我怎样才能访问这些信息?谢谢
vue-native ×11
react-native ×4
vue.js ×4
vuejs2 ×3
expo ×2
javascript ×2
nuxt.js ×2
bundle ×1
native ×1
nativescript ×1
npm ×1
xcode ×1