material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

run doc error

Open Jaware opened this issue 11 years ago • 4 comments

after run npm install, run gulp and the error logs are as follows:

[21:13:09] Starting 'setWatch'... [21:13:09] Finished 'setWatch' after 47 μs [21:13:09] Starting 'jshint'... [21:13:09] Starting 'markup'... [21:13:09] Starting 'fontIcons'... [21:13:09] Starting 'css'...

[21:13:09] 'jshint' errored after 26 ms [21:13:09] Error in plugin 'gulp-shell' Message: Command ../node_modules/.bin/jsxhint --harmony "../src/**" "./src/app/**" - -exclude ../src/utils/modernizr.custom.js failed with exit code 1 [21:13:09] Finished 'css' after 27 ms [21:13:09] Finished 'fontIcons' after 42 ms [21:13:09] Finished 'markup' after 51 ms

Jaware avatar Jun 15 '15 13:06 Jaware

Hey aksonov, thanks for reporting this issue!

React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.

  • If you don't know how to do something or something is not working as you expect but not sure it's a bug, please ask on StackOverflow with the tag react-native or for more real time interactions, ask on Discord in the #react-native channel.
  • If this is a feature request or a bug that you would like to be fixed, please report it on Product Pains. It has a ranking feature that lets us focus on the most important issues the community is experiencing.
  • We welcome clear issues and PRs that are ready for in-depth discussion. Please provide screenshots where appropriate and always mention the version of React Native you're using. Thank you for your contributions!

facebook-github-bot avatar Feb 01 '16 18:02 facebook-github-bot

The convention is actually to use [email protected], [email protected], (and there's no such things a @1x) but in any case that should not be necessary because require manages that logic internally.

Make sure that your image files are named image.png, [email protected] and [email protected] on disk, then just use the following code to display them, and it should select the correct image automatically:

<Image source={require('image.png')}/>

nicklockwood avatar Feb 03 '16 12:02 nicklockwood

Thank you very much! Probably docs should be updated to note that image.png is REQUIRED to avoid errors.

aksonov avatar Feb 03 '16 12:02 aksonov

Hm, it doesn't work - it just displays png file without suffix!

aksonov avatar Feb 03 '16 13:02 aksonov

@aksonov I'm not sure that's actually the case. It should work fine if you only include @2x version. I think the problem was just that you were missing the 'x'.

nicklockwood avatar Feb 03 '16 13:02 nicklockwood

Basically no iOS devices still have non-retina screens anymore, so we shouldn't be forcing people to include @1x assets. If the packager is failing without them, let me know and I'll file a bug.

nicklockwood avatar Feb 03 '16 13:02 nicklockwood

@nicklockwood Ogh, most stupid I've ever made (forget about 'x')

aksonov avatar Feb 03 '16 13:02 aksonov

Everything works fine, thanks...

aksonov avatar Feb 03 '16 13:02 aksonov

I am facing same issue. I have invest-icon.png, [email protected], [email protected]. But each time when i use require. It always show 1x or invest-icon.png image. I have tested one scenario that if i removed invest-icon.png then it will divide @2x image by 2 and show that and i delete @2x image then it will devide @3x image by 3 and use that image. I am testing Iphone 7 and 7 plus. Why it is not picking @2x for iphone 7 and for plus @3x. It is always trying to get 1x image.

<Image
              source={require('../resources/images/invest-icon.png')}
            />

hassanrazakhalid avatar Dec 01 '17 12:12 hassanrazakhalid

Same for me @hassanrazakhalid. Could you find a solution?

dennis-tra avatar Jan 27 '18 16:01 dennis-tra

i couldn't find the solution. for now im using react-native-responsive-dimensions. It basically resizes the icons and fonts according to screen width and height

hassanrazakhalid avatar Jan 27 '18 19:01 hassanrazakhalid