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

[turborepo] - Unable to resolve any module during "turbo lint". #5909

Closed
9vfQbg7z4ajrGQxR opened this issue Sep 8, 2023 · 2 comments · Fixed by #5912
Closed

[turborepo] - Unable to resolve any module during "turbo lint". #5909

9vfQbg7z4ajrGQxR opened this issue Sep 8, 2023 · 2 comments · Fixed by #5912
Assignees
Labels
kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage owned-by: turborepo

Comments

@9vfQbg7z4ajrGQxR
Copy link

What version of Turborepo are you using?

1.10.13

What package manager are you using / does the bug impact?

npm

What operating system are you using?

Linux

Describe the Bug

lint
turbo lint

• Packages in scope: docs, eslint-config-custom, tailwind-config, tsconfig, ui, web
• Running lint in 6 packages
• Remote caching disabled
ui:lint: cache hit (outputs already on disk), replaying logs 2a04b9abd2481f3f
ui:lint:
ui:lint: > ui@0.0.0 lint
ui:lint: > eslint src/
ui:lint:
web:lint: cache miss, executing 5f9058d103d9e696
docs:lint: cache hit (outputs already on disk), replaying logs 3ea306e6c4a186ba
docs:lint:
docs:lint: > docs@1.0.0 lint
docs:lint: > next lint
docs:lint:
docs:lint:
docs:lint: ./src/app/page.tsx
docs:lint: 2:22 Error: Unable to resolve path to module 'ui'. import/no-unresolved
docs:lint:
docs:lint: info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
docs:lint: npm ERR! Lifecycle script lint failed with error:
docs:lint: npm ERR! Error: command failed
docs:lint: npm ERR! in workspace: docs@1.0.0
docs:lint: npm ERR! at location: /home/dev/my-turborepo/apps/docs
web:lint:
web:lint: > web@1.0.0 lint
web:lint: > next lint
web:lint:
web:lint: Failed to load config "custom" to extend from.
web:lint: Referenced from: /home/dev/my-turborepo/apps/web/.eslintrc.js
web:lint: npm ERR! Lifecycle script lint failed with error:
web:lint: npm ERR! Error: command failed
web:lint: npm ERR! in workspace: web@1.0.0
web:lint: npm ERR! at location: /home/dev/my-turborepo/apps/web

Tasks: 3 successful, 3 total
Cached: 2 cached, 3 total
Time: 656ms

Expected Behavior

Let eslint understand the setup between my apps and eslint's custom config through turborepo.

To Reproduce

You just need to checkout the following example project:
https://github.com/vercel/turbo/tree/main/examples/with-tailwind

And just run: yarn lint

Reproduction Repo

https://github.com/vercel/turbo/tree/main/examples/with-tailwind

@9vfQbg7z4ajrGQxR 9vfQbg7z4ajrGQxR added kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage owned-by: turborepo labels Sep 8, 2023
@tknickman tknickman self-assigned this Sep 8, 2023
@tknickman
Copy link
Member

Good catch, you can try out the fix with:

npx create-turbo@canary with-tailwind npm -e https://github.com/vercel/turbo/tree/fix_examples_import_rule/examples/with-tailwind

@GeKVe
Copy link

GeKVe commented Sep 11, 2023

Thank you so much, both of you! 🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage owned-by: turborepo
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants