OnetapInc / chromy

Chromy is a library for operating headless chrome. 🍺🍺🍺
MIT License
606 stars 41 forks source link

Cannot find module 'babel-runtime/helpers/typeof' #70

Closed csears closed 7 years ago

csears commented 7 years ago

Greetings,

I tried to install chromy, but got some warnings during the process. When I try to require('chromy') I'm getting the error Cannot find module 'babel-runtime/helpers/typeof'. Is babel-runtime a dependency?

Here's the output of the npm install and the error...

csears$ npm install chromy
> sharp@0.18.2 install /Users/csears/Code/node_modules/chromy/node_modules/sharp
> node-gyp rebuild

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
  TOUCH Release/obj.target/libvips-cpp.stamp
  CXX(target) Release/obj.target/sharp/src/common.o
  CXX(target) Release/obj.target/sharp/src/metadata.o
  CXX(target) Release/obj.target/sharp/src/operations.o
  CXX(target) Release/obj.target/sharp/src/pipeline.o
  CXX(target) Release/obj.target/sharp/src/sharp.o
  CXX(target) Release/obj.target/sharp/src/utilities.o
  SOLINK_MODULE(target) Release/sharp.node
  TOUCH Release/obj.target/win_copy_dlls.stamp
chromy@0.4.8 ../../../node_modules/chromy
β”œβ”€β”€ uuid@3.1.0
β”œβ”€β”€ chrome-remote-interface@0.23.3 (commander@2.1.0, ws@2.0.3)
β”œβ”€β”€ chrome-launcher@0.4.0 (@types/mkdirp@0.3.29, @types/core-js@0.9.43, @types/node@6.0.66, mkdirp@0.5.1, lighthouse-logger@1.0.1, rimraf@2.6.1)
β”œβ”€β”€ async-chain-proxy@0.1.5 (babel-polyfill@6.26.0)
└── sharp@0.18.2 (semver@5.4.1, nan@2.7.0, color@2.0.0, got@7.1.0, tar@3.2.1, caw@2.0.1)

csears$ node
> const Chromy = require('chromy')
Error: Cannot find module 'babel-runtime/helpers/typeof'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/Users/csears/Code/node_modules/chromy/dist/index.js:3:16)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
>

Thanks!

dotneet commented 7 years ago

Hi @csears, thank you for reporting! Could you tell me your node version and OS?

csears commented 7 years ago

You bet. Node is v4.5.0. OS is MacOS Sierra 10.12.5.

csears commented 7 years ago

I tried updating node to v8.4.0. That seemed to fix the Cannot find module 'babel-runtime/helpers/typeof' error, but it left me with a different error.

I suspected I may have multiple out-of-date node modules, so I decided to try installing Chromy with yarn instead... yarn add chromy That seems to have fixed my issue.

I would say this is not a Chromy problem, so I'm closing the issue. Sorry for the false alarm.