Skip to content
This repository has been archived by the owner on Jun 27, 2022. It is now read-only.

Missing babel-runtime dependency in packages #211

Closed
Wollac opened this issue Aug 30, 2018 · 8 comments · Fixed by #247
Closed

Missing babel-runtime dependency in packages #211

Wollac opened this issue Aug 30, 2018 · 8 comments · Fixed by #247

Comments

@Wollac
Copy link

Wollac commented Aug 30, 2018

It seems that @ledgerhq/hw-transport-node-hid is requiring babel-runtime, but it is not included as a dependency in that particular package.json.

Steps to reproduce

  • Running the Basic example without babel-runtime, as for example in ledger-btc-test.
  • Manually adding the dependency [email protected] to the executing project resolves the issue.

Error

Error: Cannot find module 'babel-runtime/core-js/get-iterator'
@Akuukis
Copy link
Contributor

Akuukis commented Oct 16, 2018

Also @ledgerhq/hw-app-str misses babel-runtime dependency.

lib/Str.js:7:

..
var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
..

@MisterTicot
Copy link

@ledgerhq/hw-app-str, @ledgerhq/hw-transport, @ledgerhq/hw-transport-u2f, @ledgerhq/hw-transport-node-hid all requires babel-runtime and the dependency is missing in each of those packages.

@webmaster128
Copy link
Contributor

@MisterTicot is right. Could you please move the babel-runtime dependency into the packages? We are blocked by this simple update and want to avoid unnecessary workarounds.

@Wollac Wollac changed the title Missing babel-runtime dependency? Missing babel-runtime dependency in packages Nov 5, 2018
@webmaster128
Copy link
Contributor

webmaster128 commented Nov 20, 2018

This was probably fixed early November and should be released by now. Could someone check?

Removing the transform-runtime plugin leads to inlined babel-runtime code instead of the require statement.

@webmaster128
Copy link
Contributor

Looks like all packages need a rebuild. @ledgerhq/hw-transport-node-hid is still on 4.24.0.

This is probably because lerna did not detect a code change.

@webmaster128
Copy link
Contributor

Fixed in the current release 4.33.3:

$ npm view @ledgerhq/[email protected] dist.tarball
https://registry.npmjs.org/@ledgerhq/hw-transport-node-hid/-/hw-transport-node-hid-4.24.0.tgz
$ npm view @ledgerhq/hw-transport-node-hid dist.tarball
https://registry.npmjs.org/@ledgerhq/hw-transport-node-hid/-/hw-transport-node-hid-4.33.3.tgz

$ wget https://registry.npmjs.org/@ledgerhq/hw-transport-node-hid/-/hw-transport-node-hid-4.24.0.tgz
$ wget https://registry.npmjs.org/@ledgerhq/hw-transport-node-hid/-/hw-transport-node-hid-4.33.3.tgz

$ zgrep --text "babel-runtime/" hw-transport-node-hid-4.24.0.tgz
var _getIterator2 = require("babel-runtime/core-js/get-iterator");
var _regenerator = require("babel-runtime/regenerator");
var _asyncToGenerator2 = require("babel-runtime/helpers/asyncToGenerator");
var _getPrototypeOf = require("babel-runtime/core-js/object/get-prototype-of");
var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
var _createClass2 = require("babel-runtime/helpers/createClass");
var _possibleConstructorReturn2 = require("babel-runtime/helpers/possibleConstructorReturn");
var _inherits2 = require("babel-runtime/helpers/inherits");
var _promise = require("babel-runtime/core-js/promise");
var _set = require("babel-runtime/core-js/set");
var _toConsumableArray2 = require("babel-runtime/helpers/toConsumableArray");
$ zgrep --text "babel-runtime/" hw-transport-node-hid-4.33.3.tgz

@MisterTicot
Copy link

No it's not. Now you need to install regenerator-runtime and to do:

global.regeneratorRuntime = require("regenerator-runtime")

Before loading/using the library.

@webmaster128
Copy link
Contributor

@MisterTicot could you open a new issue for the regenerator-runtime dependency now that babel-runtime is not a dependency anymore?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants