Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS2 import module not found #212

Closed
patrickhousley opened this issue Sep 24, 2016 · 4 comments
Closed

TS2 import module not found #212

patrickhousley opened this issue Sep 24, 2016 · 4 comments

Comments

@patrickhousley
Copy link

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"
  }
@skellock
Copy link
Contributor

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
Copy link
Author

I moved all the dev dependencies to dependencies and it did not make a difference.

@patrickhousley
Copy link
Author

I may have found some information to help in this issue.
microsoft/TypeScript#11106

@skellock
Copy link
Contributor

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.

joshuayoes pushed a commit that referenced this issue Jan 17, 2023
Co-authored-by: Renovate Bot <bot@renovateapp.com>
joshuayoes pushed a commit that referenced this issue Feb 1, 2023
Co-authored-by: WhiteSource Renovate <renovatebot@gmail.com>
silasjmatson pushed a commit that referenced this issue Mar 14, 2023
Co-authored-by: WhiteSource Renovate <renovatebot@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants