I've been trying to write the typescript definition for a module I want to experiment with called pouchdb-react-native. Making the story short, I got this module installed, when I typed:
Unexpected crash! Please log a bug with the commandline you specified.
/path_to_project/node_modules/pouchdb-react-native/index.js:3
import PouchDB from 'pouchdb-core'
^^^^^^
SyntaxError: Unexpected token import
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:152:10)
at Module._compile (module.js:624:28)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/local/lib/node_modules/dts-gen/bin/lib/run.js:57:67)
I've been trying to write the typescript definition for a module I want to experiment with called
pouchdb-react-native
. Making the story short, I got this module installed, when I typed:I get the following error:
And this is my package.json file
My dev env is: macos: 10.13.2, node: 8.9.3, tsc: 2.6.2 and dts-gen: 0.5.7