Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working in Expo XDE (Win 10), closed without fix by admin #23

Closed
j2l opened this issue Jul 22, 2017 · 15 comments
Closed

Not working in Expo XDE (Win 10), closed without fix by admin #23

j2l opened this issue Jul 22, 2017 · 15 comments

Comments

@j2l
Copy link

j2l commented Jul 22, 2017

I got:

Error: 'assets/icons/app.png' could not be found, because 'assets/icons' is not a subdirectory of any of the roots ('E:\Downloads\antd-mobile-samples-master\rn-expo')
at Promise.all.then.stats (E:/Downloads/antd-mobile-samples-master/rn-expo/node_modules/react-native/packager/src/AssetServer/index.js:181:13)
13:11:50
Error: 'assets/icons/loading.png' could not be found, because 'assets/icons' is not a subdirectory of any of the roots ('E:\Downloads\antd-mobile-samples-master\rn-expo')
at Promise.all.then.stats (E:/Downloads/antd-mobile-samples-master/rn-expo/node_modules/react-native/packager/src/AssetServer/index.js:181:13)
13:11:50
Building JavaScript bundle: error
Unable to resolve module ../../../../App from E:\Downloads\antd-mobile-samples-master\rn-expo\node_modules\react-native-scripts\build\bin\crna-entry.js: Directory E:\Downloads\antd-mobile-samples-master\rn-expo\App doesn't exist

@silentcloud
Copy link
Contributor

image

@silentcloud
Copy link
Contributor

assets/icons/app.png file is not used in the code

@paranoidjk
Copy link
Contributor

2017-07-24 10 52 15

@silentcloud

@silentcloud
Copy link
Contributor

@paranoidjk yarn or npm install ?

@j2l
Copy link
Author

j2l commented Jul 24, 2017

npm install in my case. Win10. Latest Expo XDE.
Warnings about "not using the Expo fork" are not important. I read (but can't find), this warning will be removed soon.

I got errors, not just warnings and I use a physical device:
image

Thanks for your help.

@silentcloud
Copy link
Contributor

silentcloud commented Jul 24, 2017

@j2l I don't have android device, I have tested it with my iPhone, the error doesn't appear.

image

Please use Expo XDE to init a empty project, be sure if you can run.

@j2l
Copy link
Author

j2l commented Jul 24, 2017

Expo XDE successfully init projects. I succesfully tested RNE and native-base already. Only AntD-Mobile is not working.

@j2l
Copy link
Author

j2l commented Jul 24, 2017

Your locale-provider seems great :)

@silentcloud
Copy link
Contributor

@j2l Can you run online demo?

image

@j2l
Copy link
Author

j2l commented Jul 24, 2017

Yes, it works OK.

@j2l
Copy link
Author

j2l commented Jul 24, 2017

Adding /Assets/icons folder from another project fix this.
One of the missing icon is https://github.com/StephenGrider/AdvancedReactNative/blob/master/jobs/assets/icons/app.png

Hmm, may be AntiVirus is the cause in my case as noted by some Node.js users. A/V hates an exe (Expo or Node or else) to create files and may stop when exe is downloading/creating files too fast (1GBps in my case).
I switch to Linux.

@j2l
Copy link
Author

j2l commented Jul 24, 2017

Now I have:
screenshot_2017-07-24-13-36-56

I fixed it by http://facebook.github.io/react-native/docs/upgrading.html#content

Now, I get a missing FOLDER named alipay@3x.png
I guess it resolves as a file on Mac, not on Windows.
I fixed it changing antd-mobile-samples-master\rn-expo\components\result\demo\basic.js to:

import React from 'react';
import { ScrollView, Text, Image } from 'react-native';
import { Result } from 'antd-mobile';
export default class ResultExample extends React.Component {
    render() {
        return (<ScrollView style={{ backgroundColor: '#F5F5F9', flex: 1 }}>
      <Text style={{ margin: 10, color: '#999' }}>URI 图片</Text>
      <Result imgUrl={{ uri: 'https://zos.alipayobjects.com/rmsportal/GcBguhrOdlYvGfnsXgrE.png' }} title="验证成功" message="所提交内容已成功完成验证"/>

      <Text style={{ margin: 10, color: '#999' }}>Image source</Text>
	<Result imgUrl={{ uri:'./alipay@3x.png'}} title="验证成功" message="所提交内容已成功完成验证"/>

      <Text style={{ margin: 10, color: '#999' }}>Image element</Text>
	<Result imgUrl={{ uri:'./alipay@3x.png'}} style={{ width: 60, height: 60 }} title="验证成功" message={<Text>所提交内容已成功完成验证</Text>}/>

      <Text style={{ margin: 10, color: '#999' }}>含 button 操作</Text>
	<Result imgUrl={{ uri:'./alipay@3x.png'}} style={{ width: 60, height: 60 }} title="验证成功" message="所提交内容已成功完成验证" buttonText="完成" buttonType="primary" buttonClick={e => alert(e.toString())}/>
    </ScrollView>);
    }
}

Finally I get:
screenshot_2017-07-24-14-21-58
which seems related to a dependency:
software-mansion/react-native-svg#401

Looks like dependencies make this project very fragile.

@silentcloud
Copy link
Contributor

silentcloud commented Jul 25, 2017

rn-demo is created with create-react-native-app, you can follow the doc: use-with-create-react-app to create an empty project, then add the rn-demo code

@paranoidjk
Copy link
Contributor

Close since problem can not reproduce, so we actually can not offer help for you, sorry.

@j2l j2l changed the title not working in Expo XDE, missing folder not working in Expo XDE (Win 10) Jul 25, 2017
@j2l
Copy link
Author

j2l commented Jul 25, 2017

@silentcloud you mean rn-expo, right?

OK, I tried creating a brand new project with Expo XDE (WIN 10, not MAC), it starts OK, no error.
Then, following instructions:

npm i babel-plugin-import --only=dev, ok
npm i antd-mobile, ok
npm run eject, doesn't work: "missing script eject"
npm i svg-sprite-loader@0.3.1 less less-loader postcss-pxtorem, ok
config/webpack.config.dev.js doesn't exist
copied /components, /src, /_tests_ and App.js from antd-mobile-samples
modified .babelrc to add:

  "presets": ["babel-preset-expo"],
    "plugins": [["import", { "libraryName": "antd-mobile" }]],
  "env": {

restart XDE, missing react-navigation
npm i react-navigation, ok
restart XDE, missing iconfont.ttf,
adding them from antd-mobile-samples
restart XDE, missing antd-mobile-demo-data
npm i antd-mobile-demo-data, ok
restart XDE, wrong babel-plugin-import :(
npm i babel-plugin-import, ok
restart XDE, wrong babel-plugin-import :(
screenshot_2017-07-25-16-16-58
Aaaargh!

@paranoidjk I don't see someone tried on Windows so far, could you reopen it until someone tries with Windows 10? Thanks.

@j2l j2l changed the title not working in Expo XDE (Win 10) Not working in Expo XDE (Win 10), closed without fix by admin Jul 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants