BlueBaseJS / BlueBaseJS/cli

[Storybook-Native] undefined is not an object (evaluating '_expo.KeepAwake.activate')

未关闭
#104 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
1
派生
2
PR 合并指标
30 天内没有已合并 PR

描述

## Description

While running storybook-native `undefined is not an object (evaluating '_expo.KeepAwake.activate')` issue appears

## Expected Behavior

`bluebase storybook-native:start` should run successfully.

## Actual Behavior

![keep](https://user-images.githubusercontent.com/30393332/66459992-7b37fb00-ea8f-11e9-9243-766d87a0854a.png)

## Possible Fix

This issue is created due to storybook-native AppEntry.js its content should be,

```
import App from './../../bluebase/storybook-native/storybook';
import { activateKeepAwake } from 'expo-keep-awake';
import { registerRootComponent } from 'expo';

if (__DEV__) {
activateKeepAwake();
}

registerRootComponent(App);
```

## Steps to Reproduce

1. create a plugin
2. `bluebase storybook-native:init`
3. `bluebase storybook-native:start`

## Context

## Screenshots

## Your Environment

* Version used: `0.0.16`
* Environment name and version (e.g. Chrome 39, node.js 5.4): node.js 10.16.3
* Operating System and version (desktop or mobile): Ubuntu 18

贡献指南

这个仓库没有索引到贡献指南

调研方向

Start with the Storybook-Native AppEntry.js mentioned in the issue and inspect the KeepAwake import and activation call. Reproduce the problem with bluebase storybook-native:init followed by bluebase storybook-native:start; done means the command runs successfully without the undefined KeepAwake error.

由索引模型根据 Issue 内容生成。

评估

技术栈
react-native
领域
mobile
Issue 类型
缺陷
难度
2/5
预计耗时
1-3 小时
活跃度
停滞
描述清晰度
描述清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。