Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.
This repository was archived by the owner on Jan 13, 2024. It is now read-only.

Spawn Child process of same application #1292

Closed

Description

@sartaj-sphp

Tested Ubuntu:- I found a problem When i try to run one more app instance with child process spawn then it is failed to load module. But it is working fine on Windows 7 and 10 but failed on linux. When i checked the reason then i found environment variable was already set PKG_EXECPATH=/home/sartaj/www/res/sphpserver/sphpserver-linux. The child process load and run correctly if this variable is unset. You can see terminal output:- /home/sartaj/www/res/sphpserver/sphpserver-linux --proj /home/sartaj/www/demo --port 8001
internal/modules/cjs/loader.js:818
throw err;
^

Error: Cannot find module '/home/sartaj/www/res/sphpserver/--proj'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
at Function._resolveFilename (pkg/prelude/bootstrap.js:1711:46)
at Function.Module._load (internal/modules/cjs/loader.js:667:27)
at Function.runMain (pkg/prelude/bootstrap.js:1739:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Problem:- it couldn't load start script correctly from internal path when PKG_EXECPATH is set. Application work like as nodejs executable and find script path from hard disk.

Activity

  1. sartaj-sphp commented on Aug 18, 2021

    @sartaj-sphp
    Author

    I am resolved this problem by temporary solution with give the entry point as argument like /snapshot/p/app.js

  2. github-actions commented on Nov 17, 2021

    @github-actions

    This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label

  3. github-actions commented on Nov 22, 2021

    @github-actions

    This issue is now closed due to inactivity, you can of course reopen or reference this issue if you see fit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions