question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

astUtils.isInLoop is not a function

See original GitHub issue

Hi, please help me to solve this problem

2017-02-10 15 33 35
  • ESLint Version: 3.15.0
  • Node Version: 7.1.0
  • npm Version: 3.10.9

My package.json:

{
  "name": "MyApp",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "lint": "node node_modules/eslint/bin/eslint .",
    "lintdiff": "git diff --name-only --cached --relative | grep '\\.js$' | xargs standard | snazzy",
    "fixcode": "eslint --fix .",
    "clean": "rm -rf $TMPDIR/react-* && watchman watch-del-all && npm cache clean",
    "clean:android": "cd android/ && ./gradlew clean && cd .. && react-native run-android",
    "newclear": "rm -rf $TMPDIR/react-* && watchman watch-del-all && rm -rf ios/build/ModuleCache/* && rm -rf node_modules/ && npm cache clean && npm i",
    "test": "NODE_ENV=production ava",
    "test:watch": "ava --watch",
    "coverage": "nyc ava && nyc report --reporter=html && open coverage/index.html || xdg-open coverage/index.html",
    "tron": "node_modules/.bin/reactotron",
    "android:build": "cd android && ./gradlew assembleRelease",
    "android:install": "cd android && ./gradlew assembleRelease && ./gradlew installRelease",
    "android:hockeyapp": "cd android && ./gradlew assembleRelease && puck -submit=auto app/build/outputs/apk/app-release.apk",
    "android:devices": "$ANDROID_HOME/platform-tools/adb devices",
    "android:logcat": "$ANDROID_HOME/platform-tools/adb logcat *:S ReactNative:V ReactNativeJS:V",
    "android:shake": "$ANDROID_HOME/platform-tools/adb devices | grep '\\t' | awk '{print $1}' | sed 's/\\s//g' | xargs -I {} $ANDROID_HOME/platform-tools/adb -s {} shell input keyevent 82",
    "flow": "flow --show-all-errors"
  },
  "dependencies": {
    "apisauce": "0.6.0",
    "format-json": "1.0.3",
    "lodash": "4.17.4",
    "querystringify": "0.0.4",
    "ramda": "0.22.1",
    "react": "15.4.2",
    "react-native": "0.41.2",
    "react-native-animatable": "0.6.1",
    "react-native-config": "0.1.2",
    "react-native-device-info": "0.9.9",
    "react-native-drawer": "2.3.0",
    "react-native-i18n": "0.1.1",
    "react-native-router-flux": "3.37.0",
    "react-native-vector-icons": "4.0.0",
    "react-redux": "4.4.6",
    "redux": "3.6.0",
    "redux-logger": "2.8.1",
    "redux-persist": "3.5.0",
    "redux-saga": "0.13.0",
    "reduxsauce": "0.2.0",
    "seamless-immutable": "6.3.0"
  },
  "devDependencies": {
    "ava": "0.17.0",
    "babel-eslint": "7.1.1",
    "babel-preset-es2015": "6.22.0",
    "enzyme": "2.7.1",
    "eslint": "^3.15.0",
    "eslint-config-standard": "6.2.1",
    "eslint-plugin-promise": "3.4.0",
    "eslint-plugin-react": "^6.9.0",
    "eslint-plugin-react-native": "2.2.1",
    "eslint-plugin-standard": "2.0.1",
    "flow-bin": "0.33.0",
    "ghooks": "1.3.2",
    "mockery": "2.0.0",
    "nyc": "9.0.1",
    "react-addons-test-utils": "15.4.2",
    "react-dom": "15.4.2",
    "react-native-mock": "0.2.9",
    "reactotron-apisauce": "1.7.0",
    "reactotron-react-native": "1.7.0",
    "reactotron-redux": "1.7.0",
    "reactotron-redux-saga": "1.7.0",
    "snazzy": "5.0.0",
    "standard": "8.6.0",
    "standard-flow": "1.0.0"
  },
  "ava": {
    "files": [
      "Tests/**/*.js",
      "!Tests/Setup.js"
    ],
    "require": [
      "babel-register",
      "babel-polyfill",
      "react-native-mock/mock",
      "./Tests/Setup"
    ],
    "babel": "inherit"
  },
  "standard": {
    "parser": "babel-eslint",
    "globals": [
      "describe",
      "it",
      "fetch",
      "navigator",
      "__DEV__",
      "XMLHttpRequest",
      "FormData",
      "React$Element"
    ]
  },
  "config": {
    "ghooks": {
      "pre-commit": "if [ -d 'ignite-base' ]; then cd ignite-base; fi; npm run lint"
    }
  }
}

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
SimplGycommented, Feb 12, 2017

A shot in the dark, but likely enough I thought it was worth posting:

I got this same error message. When Atom ran eslint it failed in the way you show in the screenshot.

I ran eslint command line hoping for more detail and got it. For me the problem was having eslint installed globally, but not having installed eslint-plugin-react.

I installed eslint-plugin-react and both command line and Atom linting now work correctly.

1reaction
ilyavolodincommented, Feb 11, 2017

Can you provide a sample of code you were working on? In general, I would suggest removing your node_modules directory and running npm install again. It looks like something is very wrong with your installation of ESLint somehow.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting not a function error when invoking inside a for loop
I am getting an error when I invoke a prototype function inside of a loop. The class
Read more >
for - JavaScript | MDN - MDN Web Docs - Mozilla
Variables declared with var are not local to the loop, i.e. they are in the same scope the for loop is in. Variables...
Read more >
4. More Control Flow Tools — Python 3.11.1 documentation
If / and * are not present in the function definition, arguments may be passed to a function by position or by keyword....
Read more >
How to Exit and Stop a for Loop in JavaScript and Node.js
This tutorial shows you how to terminate the current loop in JavaScript and transfer control back to the code following the loop. Node.js...
Read more >
R Open Labs: Scripting 2 - Loops and Error Handling
The for function tells R this loop will iterate through each possible value ... This type of loop is not used very often...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found