question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to run package.json scripts using yarn

See original GitHub issue
  • Maizzle Version: 4.0.0
  • Node.js Version: 16.5.3

Hi,

As of maizzle 4.0.0 there’s a problem executing package.json scripts that use the maizzle command, IF you’re using yarn instead of npm:

yarn run v1.22.10
$ maizzle build production
env: node\r: No such file or directory
error Command failed with exit code 127.

To reproduce:

  1. Create a new starter project: maizzle new
  2. Delete package-lock.json and run yarn install
  3. Run yarn dev or yarn build

Thanks!

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:3
  • Comments:30 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
cossssmincommented, Jun 10, 2022

Hmm no other ideas for now, except to blame yarn 🙈

Need to check this with more users to ensure it’s not some strange edge case and find out what’s causing it…

1reaction
mzgajnercommented, Jun 14, 2022

Can confirm the issue, my reproduction flow:

  • maizzle wasn’t installed globally
  • Followed the getting started guide, everything works as expected using npm.
  • Once I install packages with yarn, errors start occurring when running npm run dev.
  • Errors don’t go away even if I delete yarn.lock and run npm install.
  • Only thing that fixes it is deleting node_modules and reinstalling with npm install.

Versions:

  • yarn 1.22.19
  • npm 8.5.5
  • node 16.15.0
Read more comments on GitHub >

github_iconTop Results From Across the Web

yarn can't run scripts in package.json · Issue #1045 - GitHub
When I try yarn , I use command yarn run dev or yarn start , it's not working. Some message error: yarn run...
Read more >
Why won't Yarn run scripts from the package.json?
Update your yarn package with npm or reinstall using brew. I'm using nvm for npm/node and I had the same problem with v0.15.1....
Read more >
Fix Unable to Run Yarn in Windows Terminal - PowerShell
To fix it, open PowerShell as administrator, again make sure to run this in PowerShell, not with the regular command prompt (cmd). Copy...
Read more >
Run yarn/npm scripts with fzf | sancho.dev
In a Node enviroment or a project with a package.json, It's very common to have a field "scripts" inside the package.json which stores...
Read more >
package.json - Yarn
Scripts are a great way of automating tasks related to your package, such as simple build processes or development tools. Using the "scripts"...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found