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

"got" is not found node/no-missing-import #2004

Closed
misha-erm opened this issue Mar 4, 2022 · 1 comment
Closed

"got" is not found node/no-missing-import #2004

misha-erm opened this issue Mar 4, 2022 · 1 comment

Comments

@misha-erm
Copy link

What would you like to discuss?

After upgrading got from 11.8.2 to 12.0.1 I'm receiving eslint errors from node plugin: "got" is not found node/no-missing-import

Do you have any ideas why can that happen? Thanks in advance for any tips.

NOTE: my autocomplete suggests to import got by full path: got/dist/source. With such import it doesn't fall

.eslintrc

{
    "env": {
        "es6": true,
        "jest": true,
        "node": true
    },
    "extends": [
        "eslint:recommended",
        "plugin:node/recommended-module",
        "plugin:jest/recommended",
        "prettier"
    ],
    "parserOptions": {
        "ecmaVersion": "latest"
    },
    "rules": {
        "node/no-unpublished-import": 0
    }
}

foo.js

import got from 'got';

package.json

{
  "name": "intercomapp",
  "version": "1.1.0",
  "description": "Intercom connector app",
  "type": "module",
  "engines": {
    "node": "^16.14.0"
  },
  "license": "ISC",
  "scripts": {
    "start": "node ./src/server.js",
    "start:dev": "nodemon ./src/server.js",
    "lint": "eslint --quiet .",
    "test": "node --experimental-vm-modules ./node_modules/.bin/jest --config ./jest.config.js",
    "test:debug": "node --inspect-brk --experimental-vm-modules ./node_modules/.bin/jest --config ./jest.config.js --runInBand",
    "test:ci": "yarn test --coverage --reporters=default --reporters=jest-junit"
  },
  "dependencies": {
    "@fibery/correlation-id": "4.0.0",
    "@fibery/vizydrop-logger": "3.0.1",
    "JSONStream": "1.3.5",
    "date-fns": "2.28.0",
    "dotenv": "16.0.0",
    "envalid": "7.3.0",
    "form-data": "4.0.0",
    "got": "12.0.1",
    "ioredis": "4.28.5",
    "koa": "2.13.4",
    "koa-body": "4.2.0",
    "koa-router": "10.1.1",
    "koa-send": "5.0.1",
    "lodash": "4.17.21",
    "mongodb": "4.4.1"
  },
  "devDependencies": {
    "@jackfranklin/test-data-bot": "1.4.0",
    "eslint": "8.10.0",
    "eslint-config-prettier": "8.5.0",
    "eslint-plugin-jest": "26.1.1",
    "eslint-plugin-node": "11.1.0",
    "husky": ">=7.0.4",
    "jest": "27.5.1",
    "jest-junit": "13.0.0",
    "lint-staged": ">=12.3.4",
    "nock": "13.2.4",
    "nodemon": "2.0.15",
    "prettier": "2.5.1"
  },
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
  },
  "lint-staged": {
    "*.js": "eslint --cache --fix",
    "*.{js,css,md}": "prettier --write"
  }
}

Checklist

  • [ x] I have read the documentation.
@misha-erm
Copy link
Author

Seems like I've found the root cause mysticatea/eslint-plugin-node#255

Closing

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

1 participant