Skip to main content

NPM Errors when starting node.js - Cpanel Node Js Selector

Comments

8 comments

  • andrew.n
    I don't see any obvious errors but it looks like this is something with your script as per: 10 silly lifecycle authentication-mern@1.0.0~start: Args: [ '-c', 'node backend/server/server.js' ] 11 silly lifecycle authentication-mern@1.0.0~start: Returned: code: 1 signal: null 12 info lifecycle authentication-mern@1.0.0~start: Failed to exec start script Have you installed the dependencies? Do you use the same node.js version than on your localhost? How about the npm version?
    0
  • yohanecs
    I don't see any obvious errors but it looks like this is something with your script as per: 10 silly lifecycle authentication-mern@1.0.0~start: Args: [ '-c', 'node backend/server/server.js' ] 11 silly lifecycle authentication-mern@1.0.0~start: Returned: code: 1 signal: null 12 info lifecycle authentication-mern@1.0.0~start: Failed to exec start script Have you installed the dependencies? Do you use the same node.js version than on your localhost? How about the npm version?

    Thanks for the reply @andrew.n Yes, I have installed dependencies and I'm using the same node.js version and npm version as on my localhost, below is the package.json file contents, { "name": "authentication-mern", "version": "1.0.0", "description": "Simple Mern App with authentication", "main": "server.js", "type": "module", "scripts": { "start": "node backend/server/server.js", "server": "nodemon backend/server/server.js", "frontend": "npm start --prefix public_html/mern", "dev": "concurrently \"npm run server\" \"npm run frontend\"" }, "author": "", "license": "ISC", "dependencies": { "bcryptjs": "^2.4.3", "dotenv": "^8.2.0", "express": "^4.17.1", "express-async-handler": "^1.1.4", "mongoose": "^5.11.15", "nodemailer": "^6.4.17" }, "devDependencies": { "concurrently": "^5.3.0" } }
    Also, this is a mern stack project... Is cpanel doesn't support that?
    0
  • andrew.n
    cPanel doesn't restrict the type of js you can run but you need to do some debugging to figure out what's going on because right now this is something with the script. The phusion passenger usually logs the errors to /usr/local/apache/logs/error_log though in case of CL this can be different. Have you checked that log?
    0
  • cPRex Jurassic Moderator
    I do agree this issue seems to be within the script itself. Can you check the passenger logs that @andrew.n mentioned?
    0
  • yohanecs
    Thanks for the reply @andrew.n Yes, I checked the error log in /usr/local/apache/logs/error_log. Couldn't understand the error. Can you please check the below error log? :) [QUOTE] App 28066 output: Warning: unable to write to /var/passenger/passenger.spawn.XXXXMd24GR/response/steps/subprocess_exec_wrapper/end_time: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (1612979057.363) App 28066 output: Warning: unable to write to /var/passenger/passenger.spawn.XXXXMd24GR/response/steps/subprocess_wrapper_preparation/begin_time: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (1612979057.366) App 28066 output: Warning: unable to write to /var/passenger/passenger.spawn.XXXXMd24GR/response/steps/subprocess_wrapper_preparation/begin_time: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (1612979057.388) App 28066 output: Warning: unable to write to /var/passenger/passenger.spawn.XXXXMd24GR/response/steps/subprocess_wrapper_preparation/end_time: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (1612979057.388) App 28066 output: Warning: unable to write to /var/passenger/passenger.spawn.XXXXMd24GR/response/steps/subprocess_app_load_or_exec/begin_time: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (1612979057.388) App 28066 output: Warning: unable to write to /var/passenger/passenger.spawn.XXXXMd24GR/response/steps/subprocess_app_load_or_exec/begin_time: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (1612979057.389) App 28066 output: Warning: unable to write to /var/passenger/passenger.spawn.XXXXMd24GR/response/steps/subprocess_app_load_or_exec/end_time: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (1612979057.389) App 28066 output: Warning: unable to write to /var/passenger/passenger.spawn.XXXXMd24GR/response/steps/subprocess_listen/begin_time: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (1612979057.39) App 28066 output: (node:28066) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency App 28066 output: (Use `node --trace-warnings ...` to show where the warning was created) App 28066 output: Warning: unable to write to /var/passenger/passenger.spawn.XXXXMd24GR/response/steps/subprocess_listen/begin_time: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (1612979057.394) App 28066 output: Warning: unable to write to /var/passenger/passenger.spawn.XXXXMd24GR/response/steps/subprocess_listen/end_time: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (1612979057.394)
    0
  • andrew.n
    What are the permissions of the js scripts and folders? They should be owned by the same user under which the script resides at least this is the case when you use it without CL.
    0
  • yohanecs
    What are the permissions of the js scripts and folders? They should be owned by the same user under which the script resides at least this is the case when you use it without CL.

    Thanks for the reply @andrew.n js scripts and folder permissions are 755. And I'm using cloud linux. Used cloud linux "Setup Node JS App" in Cpanel. I can give you the Cpanel login if needed or should open a ticket on Cpanel Support? I tried t debug this whole day and couldn't resolve it yet.
    0

Please sign in to leave a comment.