Issue with Piece Creation in ActivePieces CLI

Hi everyone,

I’m trying to create a new piece using the ActivePieces CLI, but it doesn’t seem to generate the files in the expected directory.

Here’s what I did:

  1. I run the command:
npm run cli pieces create
  1. When prompted, I entered the following values:
  • Piece Name: gelato
  • Package Name: @activepieces/piece-gelato
  • Piece Type: community

However, after running the command, the piece is not being generated at packages/pieces/community/gelato, as I expected.

Has anyone else faced this issue? Could there be a specific reason or configuration missing that might be causing the piece not to be created?

Thanks for your help!

Hello @Nagarajan ,

What error do you get from this command?

Hi @kishanprmr,
npm run cli pieces create

activepieces@0.45.1 cli
npx ts-node packages/cli/src/index.ts pieces create

npm warn cli npm v10.8.2 does not support Node.js v20.2.0. This version of npm supports the following nod
e versions: ^18.17.0 || >=20.5.0. You can find the latest version at https://nodejs.org/. ? Enter the piece name: gelato
? Enter the package name: @activepieces/piece-gelato
? Select the piece type: community
Validating piece name…
Validating package name…
:hammer_and_wrench: Executing nx command: npx nx generate @nx/node:library --directory=packages/pieces/community/gelato --n
ame=pieces-gelato --importPath=@activepieces/piece-gelato --publishable --buildable --projectNameAndRootFormat=as-provided --strict --unitTestRunner=none Error: Command failed: npx nx generate @nx/node:library --directory=packages/pieces/community/gelato --na
me=pieces-gelato --importPath=@activepieces/piece-gelato --publishable --buildable --projectNameAndRootFormat=as-provided --strict --unitTestRunner=none npm warn cli npm v10.8.2 does not support Node.js v20.2.0. This version of npm supports the following nod
e versions: ^18.17.0 || >=20.5.0. You can find the latest version at https://nodejs.org/. The CJS build of Vite’s Node API is deprecated. See Troubleshooting | Vite
node-api-deprecated for more details. The CJS build of Vite’s Node API is deprecated. See Troubleshooting | Vite
node-api-deprecated for more details. The CJS build of Vite’s Node API is deprecated. See Troubleshooting | Vite
node-api-deprecated for more details.
at ChildProcess.exithandler (node:child_process:419:12)
at ChildProcess.emit (node:events:511:28)
at ChildProcess.emit (node:domain:489:12)
at maybeClose (node:internal/child_process:1098:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5) {
code: 1,
killed: false,
signal: null,
cmd: ‘npx nx generate @nx/node:library --directory=packages/pieces/community/gelato --name=pieces-gelat
o --importPath=@activepieces/piece-gelato --publishable --buildable --projectNameAndRootFormat=as-provided --strict --unitTestRunner=none’, stdout: ‘\n’ +
’ NX Generating @nx/node:library\n’ +
‘\n’ +
‘\n’ +
’ NX You already have a library using the import path “@activepieces/piece-gelato”. Make sure to sp
ecify a unique one.\n’ + ‘\n’ +
‘Pass --verbose to see the stacktrace.\n’ +
‘\n’,
stderr: ‘npm warn cli npm v10.8.2 does not support Node.js v20.2.0. This version of npm supports the fo
llowing node versions: ^18.17.0 || >=20.5.0. You can find the latest version at https://nodejs.org/.\n’ + “\x1B[33mThe CJS build of Vite’s Node API is deprecated. See https://vite.dev/guide/troubleshooting.h
tml#vite-cjs-node-api-deprecated for more details.\x1B[39m\n” + “\x1B[33mThe CJS build of Vite’s Node API is deprecated. See https://vite.dev/guide/troubleshooting.h
tml#vite-cjs-node-api-deprecated for more details.\x1B[39m\n” + “\x1B[33mThe CJS build of Vite’s Node API is deprecated. See https://vite.dev/guide/troubleshooting.h
tml#vite-cjs-node-api-deprecated for more details.\x1B[39m\n” }