microsoft / dts-gen

dts-gen creates starter TypeScript definition files for any module or library.
MIT License
2.43k stars 102 forks source link

SyntaxError: Unexpected Token Import #75

Open ghost opened 7 years ago

ghost commented 7 years ago

Description

Syntax error attempting to generate definitions file for react-native-webrtc.

Terminal Output

MacBook-Pro:Desktop Aaron$ dts-gen -m react-native-webrtc
Unexpected crash! Please log a bug with the commandline you specified.
/usr/local/lib/node_modules/react-native-webrtc/index.js:3
import RTCPeerConnection from './RTCPeerConnection';
^^^^^^

SyntaxError: Unexpected token import
    at createScript (vm.js:74:10)
    at Object.runInThisContext (vm.js:116:10)
    at Module._compile (module.js:533:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/dts-gen/bin/lib/run.js:57:67)

System

levendclk commented 6 years ago

I have a same problem somebody can help ?

brunolemos commented 6 years ago

42