Closed haakonflatval-cognite closed 11 months ago
This sounds like the bin stub was emitted with CRLF line endings for some reason.
@dmichon-msft @iclanton it sounds related to this Zulip issue report:
The latest build of rush has a significant bug for systems that are sensitive to line endings. It is no longer compatible with Linux systems (5.110.0) released October 30 2023. The core files (possibly index.js or other) contain carriage return characters which are incompatible with Linux systems. I would like to open a bug report for this issue but it was suggested that I post here first. Most likely a file was modified by a windows system and the return character was added.
To repro, just install rush on a Linux (perhaps Debian for example) and run Rush install, You will get the following error:
yarn global add @microsoft/rush@5.110.0
echo rush update rush update
rush update /usr/bin/env: ‘node\r’: No such file or directory Failed to run 'override-build': Exit code was 127.
The error ‘node\r’: No such file or directory means that the system is attempting to run a command with /r appended, which is being added to the command, the command node, should run, but not ‘node\r’. This likely will only impact systems that do not expect the /r character.
Is this a known issue in the most recent release? I wouldn't mind opening an issue or locating the specific line of code and issuing a PR if this issue is not currently tracked.
Also with the release process, is there a tag or PR for the 5.110.0 I can use to review changes to find the specific file and location of the line ending addition that is causing the issue? This has blocked our pipeline build process for production with a time sensitive deployment. For the time being I have pinned to a previous known working version (5.87.0)
Proposal for PNPM to catch this problem in the future: https://github.com/pnpm/pnpm/issues/7311
Summary
Running any command with
api-extractor
throughnpx
, e.g.npx api-extractor run
crashes with the errorI am only seeing this error on version 7.38.1 of Api-Extractor, not 7.38.0. It is also only occuring on Linux, the command works fine in Windows.
Repro steps
api-extractor
setup, the package having version 7.38.1Run e.g.
npx api-extractor run
Expected result:
Api-Extractor runs with the associated settings
Actual result:
Details
Standard questions
Please answer these questions to help us investigate your issue more quickly:
@microsoft/api-extractor
version?node -v
)?