thetc
July 15, 2017, 9:57pm
1
We’re working on a way to allow Snacks to access any npm package, but until that’s ready, it comes bundled with the following packages:
@expo/ex-navigation: 3.0.0
@expo/vector-icons: 5.0.0
apollo-client: 1.3.0
assert: 1.4.1
babel-preset-expo: 2.0.0
babel-standalone: 6.24.2
babylon: 6.17.2
base-64: 0.1.0
date-fns: 1.28.5
expo: 18.0.1
gl-mat4: 1.1.4
graphql-tag: 2.2.0
hsv2rgb: 1.1.0
immutable: 3.8.1
lodash: 4.17.4
mobx: 3.1.10
mobx-react: 4.1.8
os: 0.1.1
pubnub: 4.2.3
react: 16.0.0-alpha.12
react-apollo: 1.2.0
react-native: https://github.com/expo/react-native/archive/sdk-18.0.1.tar.gz
react-native-elements: 0.12.2
react-native-tab-view: 0.0.66
react-navigation: 1.0.0-beta.11
react-redux: 5.0.5
react-router-native: 4.1.1
recast: 0.12.5
redux: 3.6.0
redux-effex: 1.1.2
redux-logger: 3.0.6
redux-thunk: 2.2.0
regl: 1.3.0
seamless-immutable: 7.1.2
socket.io-client: 2.0.1
styled-components: 2.0.0
subscriptions-transport-ws: 0.7.0
three: 0.85.2
url-parse: 1.1.9
uuid-js: 0.7.5
validator: 7.0.0
3 Likes
Any chance of adding NativeBase (nativebase.io )?
2 Likes
moment is not available ?
A version number gets added in my code, like:
import moment from ‘moment’;
// 2.18.1
But the preview gives me the error “Trying to import unknown module ‘moment’”
thetc
August 10, 2017, 6:21pm
5
We’re still doing some stabilization, and the arbitrary imports aren’t yet in a place where it just works every time. Sorry for the growing pains!
Moment is available though: https://snack.expo.io/SJhOb7cPb
1 Like
Hi guys, any update on this?
Im still having issues with third party modules …
thetc
November 8, 2017, 10:58pm
7
This is top priority for us right now. Specific reports of things that are failing for you are helpful to make sure we catch all the corner cases.
We’re currently aware of issues with:
deep imports from npm modules (eg lodash/XXX)
native-base
react-native-import-scroll-view
1 Like
Thanks @thetc , i will be waiting …
petekp
November 21, 2017, 11:18pm
9
Having issues importing victory-native
as well: https://snack.expo.io/rkvsY2Yje
thetc
November 28, 2017, 12:38am
10
We’ve made some good progress covering more of npm:
deep imports should now work (this issue also affected react-native-input-scroll-view)
victory-native (and other modules expecting access to react-native-svg) https://snack.expo.io/B1yu1E5xM
But we still have more to go:
Keep those issue reports coming!
@thetc Thanks for the progress! I have tried this one:
https://www.npmjs.com/package/react-native-canvas
And is, unfortunatey, not available. I wonder why.
here is the snack to replicate the issue
https://snack.expo.io/BJGB0oAeM
thetc
December 1, 2017, 9:00pm
13
I don’t believe that library works in expo generally
Why? It’s just a webview wrapped as a component
slorber
December 5, 2017, 11:01am
15
would be nice to support glamorous-native
louisjs
December 13, 2017, 6:28pm
16
thetc
December 27, 2017, 4:16pm
17
@louisjs Haven’t taken it all the way, but it seems like yes: https://snack.expo.io/B1shLrZXM
thetc
December 27, 2017, 4:35pm
18
@davidgortega Sorry, I knew we were working on getting canvas support into Expo and assumed that would be caught up by the same issues.
Sometimes modules will have a peer dependency that the module author assumes will be available and doesn’t explicitly list. You’ll now get a message saying Failed to install module 'x': Attempted to import missing module 'y'
and you can resolve for yourself by importing the missing dependency (in this case regenerator-runtime)
https://snack.expo.io/SJgMYBbmM
rbagchi
February 8, 2018, 11:10am
19
I am getting this error:
Device: (1:0) Error loading dependency: Error: Failed to install module 'native-base': Attempted to import missing module '@expo/vector-icons/Ionicon'
Link to my snack: https://snack.expo.io/@rbagchi/todoapp
Am I missing something?
thetc
February 8, 2018, 12:33pm
20
You have a circular dependency in TodoService, but that’s a very strange error for us to display!
Also, Firebase doesn’t like being reinitialized, which snack does very often, so you need to wrap the initializeApp call in a try catch:
https://snack.expo.io/H1lN-TtUG