Skip to content

CRLF will be replaced by LF warning appears during npm install and build on macOS #598

Open
@178inaba

Description

@178inaba

Description:
When I run npm install or npm run build on macOS, I get the following warning:
CRLF will be replaced by LF the next time Git touches it.

  • Example 1:

    warning: in the working copy of 'package-lock.json', CRLF will be replaced by LF the next time Git touches it
    
  • Example 2:

    warning: in the working copy of 'dist/cache-save/index.js', CRLF will be replaced by LF the next time Git touches it
    warning: in the working copy of 'dist/setup/index.js', CRLF will be replaced by LF the next time Git touches it
    

Action version:
This issue occurs when making changes locally, not when using it in Actions.

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

This issue occurs when making changes locally, not when using it in Actions.

Tools version:
$ node --version
v22.14.0
$ npm --version
10.9.2

Repro steps:

  1. Clone the repository on macOS.
  2. Run npm install.
    • The warning appears for package-lock.json.
  3. Run npm run build.
    • The warning appears for dist/cache-save/index.js and dist/setup/index.js.

Expected behavior:
npm install and npm run build should complete without any warnings.

Actual behavior:
The following warning appears:
CRLF will be replaced by LF the next time Git touches it.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions