Repository navigation
TS2 import module not found #212
Copy link
Copy link
Closed
Description
I am getting the below errors when importing the reactotron-react-native module.
Config:
import Reactotron, { trackGlobalErrors } from 'reactotron-react-native';
import tronsauce from 'reactotron-apisauce';
if (__DEV__) {
Reactotron
.configure({
// host: '10.0.3.2' // default is localhost (on android don't forget to `adb reverse tcp:9090 tcp:9090`)
name: 'Adnega' // would you like to see your app's name?
})
// forward all errors to Reactotron
.use(trackGlobalErrors({
// ignore all error frames from react-native (for example)
veto: (frame: any) =>
frame.fileName.indexOf('/node_modules/react-native/') >= 0
}))
// register apisauce so we can install a monitor later
.use(tronsauce())
// let's connect!
.connect();
// Totally hacky, but this allows you to not both importing reactotron-react-native
// on every file. This is just DEV mode, so no big deal.
console.tron = Reactotron;
} else {
// a mock version should you decide to leave console.tron in your codebase
console.tron = {
log: () => false,
warn: () => false,
error: () => false,
display: () => false,
image: () => false
};
}
Errors:
Error: Error at src/config/reactotron.config.ts:1:47: Cannot find module 'reactotron-react-native'.
Error at src/config/reactotron.config.ts:2:23: Cannot find module 'reactotron-apisauce'.
package.json:
"dependencies": {
"apisauce": "^0.5.0",
"format-json": "^1.0.3",
"querystringify": "0.0.4",
"ramda": "^0.22.1",
"react": "~15.3.0",
"react-native": "^0.33.0",
"react-native-animatable": "^0.6.0",
"react-native-config": "^0.1.0",
"react-native-device-info": "^0.9.5",
"react-native-drawer": "^2.3.0",
"react-native-i18n": "^0.1.1",
"react-native-maps": "^0.8.2",
"react-native-router-flux": "^3.35.0",
"react-native-vector-icons": "^2.1.0",
"react-redux": "^4.4.2",
"redux": "^3.6.0",
"redux-logger": "^2.4.0",
"redux-persist": "^3.5.0",
"redux-saga": "^0.11.1",
"reduxsauce": "0.2.0",
"seamless-immutable": "^6.1.0"
},
"devDependencies": {
"ava": "^0.16.0",
"babel-eslint": "^6.1.0",
"babel-preset-es2015": "^6.14.0",
"concurrently": "^2.2.0",
"enzyme": "^2.3.0",
"ghooks": "^1.3.2",
"mockery": "^1.7.0",
"nyc": "^8.1.0",
"react-addons-test-utils": "^15.3.1",
"react-dom": "^15.3.1",
"react-native-mock": "^0.2.6",
"reactotron-apisauce": "^1.1.2",
"reactotron-cli": "^1.1.4",
"reactotron-react-native": "^1.1.4",
"reactotron-redux": "^1.1.2",
"snazzy": "^4.0.1",
"tslint": "^3.15.1",
"tslint-react": "^1.0.0",
"typescript": "^2.0.2",
"typings": "^1.3.3"
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
skellock commentedon Sep 24, 2016
Thats strange. I see them listed as devDependencies. Does typescript not parse devDependencies the same way?
I've never used it so I'm a bit in the dark here.
patrickhousley commentedon Sep 24, 2016
I moved all the dev dependencies to dependencies and it did not make a difference.
patrickhousley commentedon Sep 24, 2016
I may have found some information to help in this issue.
microsoft/TypeScript#11106
skellock commentedon Nov 13, 2016
Apparently this issue is resolve on their end?
I don't use Typescript yet myself, so I can't verify. Feel free to re-open if you think there's something I can do to be less Typescript hostile.
chore(deps): update dependency rollup to v2.7.5 (#212)
chore(deps): update dependency @types/node to v12.12.9 (#212)
chore(deps): update dependency @types/react-native to v0.61.4 (#212)
chore(deps): update dependency semantic-release to v16.0.1 (#212)