Fork me on GitHub
#cljsrn
<
2017-06-29
>
wojciech10:06:16

Restart the dev server

wojciech10:06:28

It happens whenever you add an image (or any other non-source-code file) to your project

pesterhazy10:06:52

Here's a little script I wrote for when I run into these issues: https://gist.github.com/pesterhazy/7fc7e020afa040bef6b11f06b62d2821

pesterhazy10:06:43

basically nukes all kinds of build artifacts by xcode, re-natal, lein, react-native packager

viveke10:06:03

@wojciech I have not added any images. I am creating new project and run. I have these issue

pesterhazy11:06:57

if you're getting stuck, try starting from scratch

pesterhazy11:06:11

then go one step at a time, committing at each safe point

pesterhazy11:06:26

then you'll know what's causing the issue

pesterhazy11:06:54

annoying, but unfortunately sometimes necessary until you get more comfortable with the quirks and rough edges

pesterhazy11:06:47

if you can't figure out a (small!!) step, put that up as a minimal example in a gist, and we'll have a look

pesterhazy11:06:00

but guessing from the error message alone if often not possible

viveke11:06:09

@pesterhazy I have resolved the issues by completly re installing the node and all the environment

pesterhazy11:06:26

sometimes even that is necessary 😞

viveke11:06:34

now, I am able to create project

pesterhazy11:06:32

in the beginning of working with react native I had trouble making peace with the fact that so much in this area has a component of luck

pesterhazy11:06:01

"clean the cache", "restart" or "re-install npm" is the answer way too often here

pesterhazy11:06:17

on the other hand once you get set up, it mostly works

wojciech12:06:49

I'm guessing "in production" means when you bundle up the app as "release"

pesterhazy14:06:28

@manu, you need to do (js/require "asdf"), ideally in a top-level def, e.g. (def asdf (js/require "asdf"))

pesterhazy14:06:54

don't do weird stuff like (js/require (str "asdf-" (+ 3 4) "-foo"))

pesterhazy14:06:31

could that be it?

pesterhazy14:06:39

how do you require the module?

manu14:06:26

@pesterhazy I required

react-navigation
as you said, and I had no problem, but now I need to import an object that is inside the library, but it's not available directly, as written here https://github.com/react-community/react-navigation/issues/1400

manu14:06:51

So i tried to require it with

(def cardstyle (js/require "react-navigation/src/views/CardStackStyleInterpolator.js"))

manu14:06:21

And this is working, but I have the warning

pesterhazy14:06:44

normally that should work

pesterhazy14:06:03

or at least I think so

pesterhazy14:06:21

maybe re-natal doesn't support this style?

pesterhazy14:06:30

did you re-run use-component?

pesterhazy14:06:35

with the full string

manu14:06:39

mmm I didn't try.. I used it just when I wanted to install component

manu14:06:53

after the npm install..

manu14:06:04

I can try 🙂

pesterhazy14:06:10

yeah you may need to do that again, with the whole shebang

manu14:06:57

and without .js?

manu14:06:38

@pesterhazy Great now is working!!! 😄 If you will came in Milan you'll have a coffee offered by me! It is a long time i was looking for a solution 😄 thanks again 😄

pesterhazy14:06:28

i might take you up on that, I come to italy every summer

manu14:06:10

@pesterhazy text me if you came in Milan or Bologna 😉

domkm23:06:17

Has anyone gotten Reagent 0.7.0 to work with ReactNative?