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

ESLint not finding "src", "test", and "build" folders, suggest downgrading ESLint version #604

Open
4 tasks done
githammad opened this issue Jan 16, 2025 · 1 comment
Open
4 tasks done
Labels
class(bug) Something isn't working status(open) A new issue - not yet classified

Comments

@githammad
Copy link

Describe the issue

Description:

I encountered an issue when running npm run build. The ESLint command is failing with the following error:

It seems like the ESLint command is looking for the ./src, ./test, and ./build folders, but they do not exist in the project structure, causing the linting to fail.

Steps to Reproduce:

  1. Clone the repository.
  2. Run npm install.
  3. Run npm run build.

Suggested Solution:

I suggest downgrading the ESLint version to 8.57.0 as the latest version (8.57.1) is causing this issue.
To resolve the problem, you could either create the missing folders or adjust the ESLint configuration to match the existing project structure. However, downgrading the ESLint version would also avoid this problem.

Steps to downgrade ESLint: (will it work? I am just working on it.)

  1. Run:
    npm install eslint@8.57.0 --save-dev
    
    

How to reproduce the behavior?

(node:18496) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
(Use node --trace-deprecation ... to show where the warning was created)
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for C:\Users\hamma\Documents\icloud-photos-sync\app\build\schema.ts
at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:219:9)
at defaultGetFormat (node:internal/modules/esm/get_format:245:36)
at defaultLoad (node:internal/modules/esm/load:120:22)
at async nextLoad (node:internal/modules/esm/hooks:748:22)
at async nextLoad (node:internal/modules/esm/hooks:748:22)
at async Hooks.load (node:internal/modules/esm/hooks:385:20)
at async MessagePort.handleMessage (node:internal/modules/esm/worker:199:18) {
code: 'ERR_UNKNOWN_FILE_EXTENSION'
}

Error Code

0

Relevant log output

-

Operating system

Edition Windows 11 Pro Version 23H2 Installed on ‎5/‎13/‎2024 OS build 22631.4602 Experience Windows Feature Experience Pack 1000.22700.1055.0

Execution environment

node.js

icloud-photos-sync version

0

Checklist

@githammad githammad added class(bug) Something isn't working status(open) A new issue - not yet classified labels Jan 16, 2025
@githammad
Copy link
Author

now after downgrading lint this is the console message.

C:\Users\hamma\Documents\icloud-photos-sync\app>npm run build

icloud-photos-sync@0.0.0-development prebuild
npm run prebuild:lint && npm run prebuild:knip

icloud-photos-sync@0.0.0-development prebuild:lint
npx eslint -c eslint.config.json --fix --ext .ts ./src ./test ./build

icloud-photos-sync@0.0.0-development prebuild:knip
npx knip --no-exit-code --config knip.config.jsonc

'git' is not recognized as an internal or external command,
operable program or batch file.
'git' is not recognized as an internal or external command,
operable program or batch file.
✂️ Excellent, Knip found no issues.

icloud-photos-sync@0.0.0-development build
npm run build:dev

icloud-photos-sync@0.0.0-development build:dev
npm run build:schema && npm run build:typescript

icloud-photos-sync@0.0.0-development build:schema
npx ts-node-esm build/schema.ts

(node:16496) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
(Use node --trace-deprecation ... to show where the warning was created)
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for C:\Users\hamma\Documents\icloud-photos-sync\app\build\schema.ts
at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:219:9)
at defaultGetFormat (node:internal/modules/esm/get_format:245:36)
at defaultLoad (node:internal/modules/esm/load:120:22)
at async nextLoad (node:internal/modules/esm/hooks:748:22)
at async nextLoad (node:internal/modules/esm/hooks:748:22)
at async Hooks.load (node:internal/modules/esm/hooks:385:20)
at async MessagePort.handleMessage (node:internal/modules/esm/worker:199:18) {
code: 'ERR_UNKNOWN_FILE_EXTENSION'
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
class(bug) Something isn't working status(open) A new issue - not yet classified
Projects
None yet
Development

No branches or pull requests

1 participant