foxdriver icon indicating copy to clipboard operation
foxdriver copied to clipboard

Error: Cannot find module 'babel-runtime/helpers/asyncToGenerator'

Open autonome opened this issue 6 years ago • 2 comments

Interesting, this didn't happen before, but happens with a fresh install now.

Error: Cannot find module 'babel-runtime/helpers/asyncToGenerator' at Function.Module._resolveFilename (module.js:547:15) at Function.Module._load (module.js:474:25) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at Object. (/Users/dietrich/misc/puppeteer-fx/node_modules/foxdriver/build/index.js:7:26) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3)

After installing babel-runtime, the new error is:

(node:22784) UnhandledPromiseRejectionWarning: Error: TypeError: document.querySelector(...) is null at /Users/dietrich/misc/puppeteer-fx/node_modules/foxdriver/build/domains/console.js:87:23 at Generator.next () at step (/Users/dietrich/misc/puppeteer-fx/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30) at /Users/dietrich/misc/puppeteer-fx/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13 at at process._tickCallback (internal/process/next_tick.js:188:7)

Some more info here on potential fix:

https://stackoverflow.com/questions/34338416/babelhelpers-asynctogenerator-is-not-a-function-on-react-native-0-16-0-and-0-1#34736520

autonome avatar Nov 06 '18 17:11 autonome

I got the same error, doing yarn add babel-runtime resolved it for me for now, but I am haven't done much more than that yet

I can see that babel-runtime was added to devDependencies in commit a08837156b432cd1a7a7777811d2529440d9b6a1

Perhaps it should be added to dependencies instead?

sunnz avatar Aug 27 '19 06:08 sunnz

@sunnz, your solution worked for me.

Thanks!

SirPhemmiey avatar Oct 14 '19 09:10 SirPhemmiey