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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spawn react-scripts ENOENT #12976

Closed
2 tasks done
WCanirinka opened this issue Jul 20, 2023 · 3 comments
Closed
2 tasks done

spawn react-scripts ENOENT #12976

WCanirinka opened this issue Jul 20, 2023 · 3 comments
Labels
pending-response Issue is pending response from the issue author pending-triage Issue is pending triage platform-push Issues related to `amplify push`

Comments

@WCanirinka
Copy link

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

18.17.0

Amplify CLI Version

12.1.1

What operating system are you using?

Mac

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

No manual changes made

Describe the bug

/var/folders/8r/95d5dqn56_l5cn7nqrdhm47h0000gn/T/asystPaie/report-1689845743490.zip

I am trying to deploy a React app but I am getting this error spawn react-scripts ENOENT

Expected behavior

Deployment successful

Reproduction steps

  1. Deploy manually
  2. Initialize the project using amplify unit
  3. Then deploy it using amplify publish

Project Identifier

/var/folders/8r/95d5dqn56_l5cn7nqrdhm47h0000gn/T/asystPaie/report-1689845743490.zip

Log output

# Put your logs below this line
✖ There was an error pulling the backend environment dev.
🛑 EACCES: permission denied, mkdir '/Users/asyst/Desktop/Asyst/erp-paie-frontend/amplify/.temp'

Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/

Session Identifier: c39459ea-feaa-4734-accb-dce803f9e576


✔ Successfully pulled backend environment dev from the cloud.

    Current Environment: dev
    
┌──────────┬─────────────────┬───────────┬───────────────────┐
│ Category │ Resource name   │ Operation │ Provider plugin   │
├──────────┼─────────────────┼───────────┼───────────────────┤
│ Hosting  │ amplifyhosting  │ No Change │ awscloudformation │
├──────────┼─────────────────┼───────────┼───────────────────┤
│ Hosting  │ S3AndCloudFront │ No Change │ awscloudformation │
└──────────┴─────────────────┴───────────┴───────────────────┘

No changes detected

? Do you still want to publish the frontend? Yes
frontend build command execution error
Error: spawn react-scripts ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:476:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn react-scripts',
  path: 'react-scripts',
  spawnargs: [ 'build' ]
}
🛑 spawn react-scripts ENOENT

Resolution: Please report this issue at https://github.com/aws-amplify/amplify-cli/issues and include the project identifier from: 'amplify diagnose --send-report'
Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/
🛑 spawn react-scripts ENOENT

Resolution: Please report this issue at https://github.com/aws-amplify/amplify-cli/issues and include the project identifier from: 'amplify diagnose --send-report'
Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/

Session Identifier: 45458bfb-90f8-4e4d-ac1b-9a3c300273e7

Additional information

No response

Before submitting, please confirm:

  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.
@WCanirinka WCanirinka added the pending-triage Issue is pending triage label Jul 20, 2023
@ykethan ykethan added the platform-push Issues related to `amplify push` label Jul 20, 2023
@ykethan
Copy link
Contributor

ykethan commented Jul 20, 2023

Hey @WCanirinka, thank you for reaching out. Can you confirm your project settings point to the appropriate distribution directory? amplify/.config/project-config.json. Additionally, check if the BuildCommand is set to the appropriate commands such as npm run build or pnpm build? if not we can modify this by either editing this file manually or stepping through amplify configure project
note: If you do not see the amplify/.config folder, we will need to open .vscode/settings.json and set amplify/.config as false.

@ykethan ykethan added the pending-response Issue is pending response from the issue author label Jul 20, 2023
@josefaidt
Copy link
Contributor

Closing due to inactivity

@josefaidt josefaidt closed this as not planned Won't fix, can't repro, duplicate, stale Aug 14, 2023
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-response Issue is pending response from the issue author pending-triage Issue is pending triage platform-push Issues related to `amplify push`
Projects
None yet
Development

No branches or pull requests

3 participants