Error code
ScriptFailed
Script name
scripts/npm-start.sh
Message
Script at specified location: scripts/npm-start.sh run as user root failed with exit code 254
This is npm-start.sh file
#!/bin/bash
cd /var/api
npm start
This is the error
[stderr]npm ERR! Linux 4.15.0-1041-aws
[stderr]npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start"
[stderr]npm ERR! node v8.10.0
[stderr]npm ERR! npm v3.5.2
[stderr]npm ERR! path /var/api/package.json
[stderr]npm ERR! code ENOENT
[stderr]npm ERR! errno -2
[stderr]npm ERR! syscall open
[stderr]
[stderr]npm ERR! enoent ENOENT: no such file or directory, open '/var/api/package.json'
[stderr]npm ERR! enoent ENOENT: no such file or directory, open '/var/api/package.json'
[stderr]npm ERR! enoent This is most likely not a problem with npm itself
[stderr]npm ERR! enoent and is related to npm not being able to find a file.
[stderr]npm ERR! enoent
[stderr]
[stderr]npm ERR! Please include the following file with any support request:
[stderr]npm ERR! /var/api/npm-debug.log```
Event Log
Error code
ScriptFailed
Script namescripts/npm-start.sh
MessageScript at specified location: scripts/npm-start.sh run as user root failed with exit code 254
This is npm-start.sh file
This is the error