Nativebase: ejectTheme message incorrect, import path no longer valid

Created on 14 Feb 2017  路  5Comments  路  Source: GeekyAnts/NativeBase

react-native, react and native-base version

[email protected]
[email protected]
[email protected]

Expected behaviour

When we run
node node_modules\native-base\ejectTheme.js

The message is incorrect.

https://github.com/GeekyAnts/NativeBase/blob/master/ejectTheme.js#L13

Actual behaviour

Either there should be an index.js in src\theme, or the L13 above should be:
'import getTheme from \'./native-base-theme/components';',

Steps to reproduce (code snippet or screenshot)

Screenshot of emulator/device

Is the bug present in both ios and android or in any one of them?

Tested android, must also affect ios

Any other additional info which would help us debug the issue quicker.

Most helpful comment

There is still an issue with the docs, it references the wrong path in the 2.0.0 Customize Docs. It threw me off:

image

All 5 comments

The idea is to eject both the components as well as the variable folders. It seems to work fine. What exactly is the problem at your end? Are the folders not getting copied?

Hi,
The folders are copied, the issue is that the eject script message is incorrect:

import getTheme from './native-base-theme';

There is no longer an index.js in ./native-base-theme, so the import fails.

In order to make it work, one has to import from the components folder:

import getTheme from './native-base-theme/components';

Oops! Sorry. Will be fixed.

There is still an issue with the docs, it references the wrong path in the 2.0.0 Customize Docs. It threw me off:

image

@srhise i think there is no import getTheme from inside native-base-theme/components/index.js
@sankhadeeproy007

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Landerson352 picture Landerson352  路  3Comments

Bundas picture Bundas  路  3Comments

muthuraman007 picture muthuraman007  路  3Comments

kitsune7 picture kitsune7  路  3Comments

inv2004 picture inv2004  路  3Comments