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:
Any chance of adding NativeBase (
moment is not available ?
A version number gets added in my code, like:
import moment from ‘moment’;
But the preview gives me the error “Trying to import unknown module ‘moment’”
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:
Hi guys, any update on this?
Im still having issues with third party modules …
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)
@thetc, i will be waiting …
Having issues importing
victory-native as well:
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)
But we still have more to go:
Keep those issue reports coming!
@thetc Thanks for the progress! I have tried this one:
And is, unfortunatey, not available. I wonder why.
here is the snack to replicate the issue
I don’t believe that library works in expo generally
Why? It’s just a webview wrapped as a component
would be nice to support glamorous-native
@louisjs Haven’t taken it all the way, but it seems like yes: https://snack.expo.io/B1shLrZXM
@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)
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:
Am I missing something?
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: