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

enforce-module-boundaries error, did not find .tsx,find .ts only #29016

Open
1 of 4 tasks
LesterWeng opened this issue Nov 21, 2024 · 0 comments
Open
1 of 4 tasks

enforce-module-boundaries error, did not find .tsx,find .ts only #29016

LesterWeng opened this issue Nov 21, 2024 · 0 comments

Comments

@LesterWeng
Copy link

Current Behavior

eslint . --fix meet a error which is caused by Rule: "@nx/enforce-module-boundaries"

Expected Behavior

eslint . --fix can execute success

GitHub Repo

No response

Steps to Reproduce

1.in a tsx,use import { DatePicker } from '@pos/widget',DatePicker is a tsx and not as ts
2. run eslint . --fix

Nx Report

NX   Report complete - copy this into the issue template

Node   : 20.15.1
OS     : darwin-arm64
pnpm   : 9.12.2

nx (global)        : 19.4.3
nx                 : 19.4.3
@nx/js             : 19.4.3
@nx/jest           : 19.4.3
@nx/eslint         : 19.4.3
@nx/workspace      : 19.4.3
@nx/eslint-plugin  : 19.4.3
@nx/react          : 19.4.3
@nx/vite           : 19.4.3
@nx/web            : 19.4.3
typescript         : 5.4.5
---------------------------------------
Registered Plugins:
@nx/vite/plugin
@nx/eslint/plugin
@nx/jest/plugin

Failure Logs

[Error - 11:19:21] An unexpected error occurred:
[Error - 11:19:21] Error: ENOENT: no such file or directory, open '/Users/lester/Documents/Menusifu/cloud-pos-front/libs/widget/src/base/date-picker/index.ts'
Occurred while linting /Users/lester/Documents/Menusifu/cloud-pos-front/libs/widget/src/gift-card/components/base-card/index.tsx:4
Rule: "@nx/enforce-module-boundaries"
    at readFileSync (node:fs:448:20)
    at t.readFileSync (node:electron/js2c/node_init:2:9900)
    at hasMemberExport (/Users/lester/Documents/Menusifu/cloud-pos-front/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@[email protected]_@sw_r6cnujfukzoba4w7fqzwdebsdu/node_modules/@nx/eslint-plugin/src/utils/ast-utils.js:75:47)
    at getRelativeImportPath (/Users/lester/Documents/Menusifu/cloud-pos-front/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@[email protected]_@sw_r6cnujfukzoba4w7fqzwdebsdu/node_modules/@nx/eslint-plugin/src/utils/ast-utils.js:210:17)
    at Object.fix (/Users/lester/Documents/Menusifu/cloud-pos-front/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@[email protected]_@sw_r6cnujfukzoba4w7fqzwdebsdu/node_modules/@nx/eslint-plugin/src/rules/enforce-module-boundaries.js:265:98)
    at normalizeFixes (/Users/lester/Documents/Menusifu/cloud-pos-front/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/linter/report-translator.js:194:28)
    at /Users/lester/Documents/Menusifu/cloud-pos-front/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/linter/report-translator.js:365:49
    at Object.report (/Users/lester/Documents/Menusifu/cloud-pos-front/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/linter/linter.js:1047:41)
    at run (/Users/lester/Documents/Menusifu/cloud-pos-front/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@[email protected]_@sw_r6cnujfukzoba4w7fqzwdebsdu/node_modules/@nx/eslint-plugin/src/rules/enforce-module-boundaries.js:243:29)
    at ImportDeclaration (/Users/lester/Documents/Menusifu/cloud-pos-front/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@[email protected]_@sw_r6cnujfukzoba4w7fqzwdebsdu/node_modules/@nx/eslint-plugin/src/rules/enforce-module-boundaries.js:481:17)

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant