我设置了一个开发环境,将Windows 8和Ubuntu作为虚拟机.为此,我使用VirtualBox.
我还设法在VirtualBox中创建一个共享文件夹.
在这个共享文件夹中,我尝试使用Yeoman的ember-generator启动一个项目.
yo ember --skip-install --karma
npm install --no-bin-links
Run Code Online (Sandbox Code Playgroud)
对于安装模块NPM,我使用选项"--no-bin-links"不创建符号链接.不幸的是,我仍然有错误创作符号链接...我使用虽然这个选项?他有错误吗?
我是本机反应的新手,我在处理屏幕导航时使用非常简单的演示应用程序面临这个问题 收到此错误消息 TaskQueue: Error with task: undefined is not an object (evaluating '_this.view._component.measureInWindow')
这是错误的屏幕截图:
这是我的代码 App.js
import React, {Component} from 'react';
import {createStackNavigator} from 'react-navigation';
import HomeActivity from './components/HomeActivity';
import ProfileActivity from './components/ProfileActivity';
const RootStack = createStackNavigator(
{
Home: {
screen: HomeActivity,
},
Profile: {
screen: ProfileActivity,
},
},
{
initialRouteName: 'Home',
},
);
export default class App extends Component {
render() {
return(
<RootStack />
);
}
}Run Code Online (Sandbox Code Playgroud)
主页Activity.js
import React, {Component} from 'react';
import {StyleSheet, Text, View, Button} …Run Code Online (Sandbox Code Playgroud)我一直在尝试将 React Native 库(本地库)包含到 React Native 应用程序中。
所以我使用它安装了
npm 安装库路径
然后我跑
npm 链接库名称
我可以在 mainProject 的 node_modules 中看到该包。另外,在 package.json 中,我可以看到依赖项:
"dependencies": {
"react": "16.13.1",
"react-native": "0.63.2",
"react-native-first-library": "file:../react-native-first-library",
"react-native-toast-message": "^1.3.3",
"react-native-webview": "^10.8.3"
},
Run Code Online (Sandbox Code Playgroud)
react-native-first-library 是我的反应模块。
我已经做好了
- 清晰的守望者手表:守望者 watch-del-all
- 删除node_modules: rm -rf node_modules 并运行yarn install
- 重置 Metro 的缓存:yarn start --reset-cache
- 删除缓存: rm -rf /tmp/metro-*
但它仍然不起作用。我不知道为什么这些事情如此复杂。
我想从一个相对路径的使用包和我已经做npm install ../../ExamplePackage和react-native install ../../ExamplePackage。这些包在多个层次上是相对的,而不仅仅是一个层次。
我收到以下错误
error: bundling failed: Error: Unable to resolve module `ExamplePackage` from `/Users/vikasagr/workspace/test/ReactNative/MyPackage/src/index.js`: Module `ExamplePackage` does not exist in the Haste module map
This might be related to https://github.com/facebook/react-native/issues/4968
To resolve try the following:
1. Clear watchman watches: `watchman watch-del-all`.
2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.
3. Reset Metro Bundler cache: `rm -rf /tmp/metro-bundler-cache-*` or `npm start -- --reset-cache`. 4. Remove haste cache: `rm -rf /tmp/haste-map-react-native-packager-*`.
at …Run Code Online (Sandbox Code Playgroud)