react-email icon indicating copy to clipboard operation
react-email copied to clipboard

Package manager is not being detected correctly

Open vighnesh153 opened this issue 2 years ago • 1 comments

I have a starter setup of react-email which I did by following the documentation here

When I run the dev or export npm scripts, I get yarn command not found error.

> email dev

✔ Emails preview generated
â ‹ Installing dependencies...
✔ Dependencies installed
/bin/sh: yarn: command not found

Upon investigation, I think the detect-package-manager doesn't seem to be working as desired.

Snippet from the dev command

I see that in the catch block, we are not logging the error. We could do 2 things:

  • Log the error so that it would be helpful to debug the issue (Maybe we can cut a ticket to the detect-package-manager repo?)
  • We can default to npm instead of yarn because everyone will have npm installed as it comes bundled with node but not everyone has yarn.

vighnesh153 avatar Jan 29 '23 03:01 vighnesh153

I'm currently getting this issue, please resolve this ASAP!

keeandev avatar Feb 02 '23 04:02 keeandev

Just installed react-mail for the first time and exactly the same issue: /bin/sh: yarn: command not found

Jaarson avatar Feb 05 '23 20:02 Jaarson

Hey guys! Nice tool you have here! I'm trying to setup a local environment and I still get this issue (it then freeze) :

> npm run dev

> [email protected] dev
> email dev

✔ Emails preview generated
â ‹ Installing dependencies...
✔ Dependencies installed
/bin/sh: 1: yarn: not found

I'm using NPM

{
  emails: '0.0.0',
  npm: '9.3.1',
  node: '18.14.0',
  v8: '10.2.154.23-node.22',
  uv: '1.44.2',
  zlib: '1.2.13',
  brotli: '1.0.9',
  ares: '1.18.1',
  modules: '108',
  nghttp2: '1.51.0',
  napi: '8',
  llhttp: '6.0.10',
  uvwasi: '0.0.14',
  acorn: '8.8.1',
  simdutf: '3.1.0',
  undici: '5.14.0',
  openssl: '3.0.7+quic',
  cldr: '42.0',
  icu: '72.1',
  tz: '2022g',
  unicode: '15.0',
  ngtcp2: '0.8.1',
  nghttp3: '0.7.0'
}

I've followed this documentation : https://react.email/docs/getting-started/automatic-setup

npx create-email@latest
cd react-email-starter
npm install
npm run dev

Is there a fix, or am I doing something wrong? Cheers

Grraahaam avatar Mar 27 '23 06:03 Grraahaam

Hey guys! Nice tool you have here! I'm trying to setup a local environment and I still get this issue (it then freeze) :

> npm run dev

> [email protected] dev
> email dev

✔ Emails preview generated
â ‹ Installing dependencies...
✔ Dependencies installed
/bin/sh: 1: yarn: not found

I'm using NPM

{
  emails: '0.0.0',
  npm: '9.3.1',
  node: '18.14.0',
  v8: '10.2.154.23-node.22',
  uv: '1.44.2',
  zlib: '1.2.13',
  brotli: '1.0.9',
  ares: '1.18.1',
  modules: '108',
  nghttp2: '1.51.0',
  napi: '8',
  llhttp: '6.0.10',
  uvwasi: '0.0.14',
  acorn: '8.8.1',
  simdutf: '3.1.0',
  undici: '5.14.0',
  openssl: '3.0.7+quic',
  cldr: '42.0',
  icu: '72.1',
  tz: '2022g',
  unicode: '15.0',
  ngtcp2: '0.8.1',
  nghttp3: '0.7.0'
}

I've followed this documentation : https://react.email/docs/getting-started/automatic-setup

npx create-email@latest
cd react-email-starter
npm install
npm run dev

Is there a fix, or am I doing something wrong? Cheers

Looks like the fix is not working. Let's re-open.

bukinoshita avatar Apr 05 '23 07:04 bukinoshita

Internally detection is done through lock files. @Grraahaam and others, can you please do ls -a?

igas avatar Sep 14 '23 06:09 igas

This should not happen the same as of [email protected] and should now be fixed.

Check the changelog and our blog post for more info on this.

gabrielmfern avatar Jan 30 '24 11:01 gabrielmfern