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

Not working with Nodejs v16.19.1 and v18.14.0+ #8

Open
alexedtionweb opened this issue Mar 14, 2023 · 4 comments
Open

Not working with Nodejs v16.19.1 and v18.14.0+ #8

alexedtionweb opened this issue Mar 14, 2023 · 4 comments

Comments

@alexedtionweb
Copy link

npx serverless mono --nestApp car --command offline
serverless-nest-monorepo: Serverless NestJS Monorepo Plugin Initialized for: car
serverless-nest-monorepo: Building Nest app: car...
serverless-nest-monorepo: Nest app car build finished.
serverless-nest-monorepo: Using serverless configuration from apps/car/serverless.yml
serverless-nest-monorepo: Running: serverless offline --config serverless-car.tmp.yml
/bin/sh: 1: serverless: not found

Exit code: 127
serverless-nest-monorepo: Cleaning up: serverless-car.tmp.yml
@gdemiollis
Copy link

Same problem.
It only worked with Node 14.

@fakereto
Copy link

fakereto commented Jul 10, 2023

This issue is because the environment hasn't been created yet when the spawn function is called.
This issue can be resolved ensuring that the env = Object.create has been created before the spawn.

async function passthru...
const env = Object.create(process?.env || {});
console.log("Creating child process..."); // My test, new line created.
const child = spawn(exe, args, {
  ...options,
  shell: true,
});

@alvincrisuy
Copy link

@fakereto where do we put that part?

@thedarkknight197
Copy link

same issue here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants