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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

env: node\r: No such file or directory #20

Closed
fartinmartin opened this issue Apr 29, 2022 · 8 comments
Closed

env: node\r: No such file or directory #20

fartinmartin opened this issue Apr 29, 2022 · 8 comments

Comments

@fartinmartin
Copy link
Contributor

Looks like this is a Windows/Mac line ending issue, but not sure exactly how to fix this.

yarn create bolt-cep my-app --template react
yarn create v1.22.17
[1/4] 馃攳  Resolving packages...
[2/4] 馃殮  Fetching packages...
[3/4] 馃敆  Linking dependencies...
warning "create-bolt-cep > ts-node@10.7.0" has unmet peer dependency "@types/node@*".
[4/4] 馃敤  Building fresh packages...

success Installed "create-bolt-cep@0.1.9" with binaries:
      - create-bolt-cep
env: node\r: No such file or directory
error Command failed.
Exit code: 127
Command: /Users/Martin/.yarn/bin/create-bolt-cep
Arguments: my-app --template react
Directory: /Users/Martin/dev
Output:

info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.
@justintaylor-dev
Copy link
Contributor

Are you using Node 16 or above?

@fartinmartin
Copy link
Contributor Author

Yeah, v16.13.0

@justintaylor-dev
Copy link
Contributor

What OS and version are you on?

@fartinmartin
Copy link
Contributor Author

npx envinfo --system --binaries output:

System:
  OS: macOS 12.3
  CPU: (8) arm64 Apple M1
  Memory: 2.23 GB / 16.00 GB
  Shell: 5.8 - /bin/zsh
Binaries:
  Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
  Yarn: 1.22.17 - /opt/homebrew/bin/yarn
  npm: 8.5.2 - ~/.nvm/versions/node/v16.13.0/bin/npm

Worried it may be an M1 thing, I tested the same yarn create ... command and got the same error on another machine with this npx envinfo --system --binaries output:

System:
  OS: macOS 12.3.1
  CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Memory: 204.94 MB / 16.00 GB
  Shell: 5.8 - /bin/zsh
Binaries:
  Node: 16.15.0 - /usr/local/bin/node
  Yarn: 1.22.15 - ~/.npm-global/bin/yarn
  npm: 8.5.5 - /usr/local/bin/npm

@timhaywood
Copy link
Collaborator

It looks like this is endeed a line endings issue, the built file has CRLF line endings (windows) rather than LF. Can confirm the line endings on the file here: https://unpkg.com/create-bolt-cep@0.2.3/index.js

@justintaylor-dev I assume you're building on Windows, and not getting the error? I also got the error on macOS.

Also wonder if this issue would better suited to @hyperbrew/create-bolt-cep repo?

Solution

Should be able to output LF line endings by specifying the newLine TypeScript compiler option.

Pull request opened here: hyperbrew/create-bolt-cep#1

@justintaylor-dev
Copy link
Contributor

Thanks for the PR @timhaywood! hyperbrew/create-bolt-cep#1

@fartinmartin Fix has been merged and should be working in 0.2.5, or next time you run yarn create bolt-cep

@fartinmartin
Copy link
Contributor Author

fartinmartin commented May 7, 2022

Awesome, thank you both!

@justintaylor-dev, having played around with this project a bit I just wanted to say it's awesome鈥擨 appreciate you making, maintaining, and open-sourcing it!

@justintaylor-dev
Copy link
Contributor

@fartinmartin awesome to hear, glad to see people putting it to use!

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

No branches or pull requests

3 participants