Bugsnag-js: Update expo to sdk33 / sdk34

Created on 15 Jul 2019  路  8Comments  路  Source: bugsnag/bugsnag-js

As expo package is deprecated, this is displayed when running expo start and building app :

The following APIs have moved to separate packages and importing them from the "expo" package is deprecated: Constants, FileSystem.

1. Add correct versions of these packages to your project using:

   expo install expo-constants expo-file-system

   If "install" is not recognized as an expo command, update your expo-cli installation.

2. Change your imports so they use specific packages instead of the "expo" package:

 - import { Constants } from 'expo' -> import Constants from 'expo-constants'
 - import { FileSystem } from 'expo' -> import * as FileSystem from 'expo-file-system'
bug released

Most helpful comment

Hi @mattias-persson, we are planning to get this in a release within the next two weeks. We will let you know when this has been released.

All 8 comments

const { Constants } = require('expo') in expo/src/notifier.js, plugin-expo-app/ and plugin-expo-device/device.js
const { FileSystem } = require('expo')in delivery-expo/queue.js

Hi @lc3t35

Thanks for raising. We are already aware of the issue and have started a discussion with Expo:
https://github.com/expo/expo/issues/4764

The problem is that if we upgrade to SDK33 that results in SDK32 and lower no longer being supported so we're asking the Expo maintainers if we have any options for supporting multiple SDK versions in bugsnag-js as we don't yet want to drop support for older versions.

We'll keep this open for now until we have a way forward.

Hi @mattdyoung, not sure if I should open a separate issue for this, but it looks like SDK34 will be out imminently as Dependabot triggered a build for us, and I'm seeing this all over the place:

TypeError: Cannot read property 'cacheDirectory' of undefined

> 1 | import bugsnag from "@bugsnag/expo";
    | ^

I'm assuming it's due to the changes in expo-file-system that @lc3t35 flagged, since looking at queue.js I can see FileSystem.cacheDirectory.

@lc3t35 @HappyTepid
We're now in the process of updating our library to support Expo SDK 34 and this should be released in the next couple of weeks.

We were having discussions with Expo under https://github.com/expo/expo/issues/4764 to see if we could find a way to continue to support SDK < 33 at the same time but that hasn't proved possible so we plan to output a warning if an attempt is made to use the updated library with SDK < 33.

@mattdyoung I just updated an app to Expo SDK 34 and now receive the error @HappyTepid mentioned above. Do you know when the update is planned to be released?

Hi @mattias-persson, we are planning to get this in a release within the next two weeks. We will let you know when this has been released.

I need also to update to sdk34 and as @HappyTepid @mattdyoung , this time I'm stuck with the cacheDirectory problem.
Can you please provide a beta quickfix for sdk34 ?

@mattias-persson @lc3t35 @HappyTepid This has now been released in the latest version of bugsnag-js: https://github.com/bugsnag/bugsnag-js/releases/tag/v6.4.0

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rafmst picture rafmst  路  3Comments

chobo2 picture chobo2  路  6Comments

darkyndy picture darkyndy  路  4Comments

bathos picture bathos  路  6Comments

killia15 picture killia15  路  6Comments