hello there,
I need help to publish a custom piece into our hosted version of Activepieces on a distant server.
We built a piece in activepieces/packages/pieces/custom/sellsy
on local environment,
npm start
works fine, everything is ok, I can use the cusotm piece, update it etc…
BUT, when I try to publish the piece to a distant version of Activepieces (on our test environment)
I’ve an error on step npx nx build pieces-sellsy --skip-cache
saying NX Cannot find project 'pieces-sellsy'
Error is triggered when using
:
npm run publish-piece-to-api or npm run build-piece
Does someone have any idea from where this error came from ? and how to fix it ?
npm run build-piece
> activepieces@0.50.5 build-piece
> npx ts-node packages/cli/src/index.ts pieces build
? Enter the piece folder name sellsy
Error: Command failed: npx nx build pieces-sellsy --skip-cache
at ChildProcess.exithandler (node:child_process:422:12)
at ChildProcess.emit (node:events:517: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:303:5) {
code: 1,
killed: false,
signal: null,
cmd: 'npx nx build pieces-sellsy --skip-cache',
stdout: "\n NX Cannot find project 'pieces-sellsy'\n\n",
stderr: ''
}
Data
- directory of the piece :
packages/pieces/custom/sellsy
- in
package.json
of the piece :"name": "@activepieces/piece-sellsy"
- in
project.json
of the piece :"name": "pieces-sellsy"
- exec of
npx nx show projects | grep sellsy
shows nothing
What we tried
We try to move the custom/sellsy
into community/sellsy
, and now npx nx show projects | grep sellsy
shows a result. BUT, when try to built, we had 2k log lines
Error: Command failed: npx nx build pieces-sellsy --skip-cache
packages/pieces/community/common/src/index.ts:1:15 - error TS6059: File '/home/{my_user}/Projects/activepieces/packages/pieces/community/common/src/lib/authentication/index.ts' is not under 'rootDir' '/home/{my_user}/Projects/activepieces/packages/pieces/community/sellsy'. 'rootDir' is expected to contain all source files.
Stacktrace (60 first lines)
npm run build-piece
> activepieces@0.50.5 build-piece
> npx ts-node packages/cli/src/index.ts pieces build
? Enter the piece folder name sellsy
Error: Command failed: npx nx build pieces-sellsy --skip-cache
packages/pieces/community/common/src/index.ts:1:15 - error TS6059: File '/home/{my_user}/Projects/activepieces/packages/pieces/community/common/src/lib/authentication/index.ts' is not under 'rootDir' '/home/{my_user}/Projects/activepieces/packages/pieces/community/sellsy'. 'rootDir' is expected to contain all source files.
The file is in the program because:
Imported via './lib/authentication' from file '/home/{my_user}/Projects/activepieces/packages/pieces/community/common/src/index.ts'
Imported via '../../authentication' from file '/home/{my_user}/Projects/activepieces/packages/pieces/community/common/src/lib/http/core/delegating-authentication-converter.ts'
Imported via '../../authentication' from file '/home/{my_user}/Projects/activepieces/packages/pieces/community/common/src/lib/http/core/base-http-client.ts'
Imported via '../../authentication' from file '/home/{my_user}/Projects/activepieces/packages/pieces/community/common/src/lib/http/core/http-request.ts'
1 export * from './lib/authentication';
~~~~~~~~~~~~~~~~~~~~~~
packages/pieces/community/common/src/lib/http/core/delegating-authentication-converter.ts:8:8
8 } from '../../authentication';
~~~~~~~~~~~~~~~~~~~~~~
File is included via import here.
packages/pieces/community/common/src/lib/http/core/base-http-client.ts:1:32
1 import { Authentication } from '../../authentication';
~~~~~~~~~~~~~~~~~~~~~~
File is included via import here.
packages/pieces/community/common/src/lib/http/core/http-request.ts:4:32
4 import { Authentication } from '../../authentication';
~~~~~~~~~~~~~~~~~~~~~~
File is included via import here.
packages/pieces/community/common/src/index.ts:2:15 - error TS6059: File '/home/{my_user}/Projects/activepieces/packages/pieces/community/common/src/lib/helpers/index.ts' is not under 'rootDir' '/home/{my_user}/Projects/activepieces/packages/pieces/community/sellsy'. 'rootDir' is expected to contain all source files.
2 export * from './lib/helpers';
~~~~~~~~~~~~~~~
packages/pieces/community/common/src/index.ts:4:15 - error TS6059: File '/home/{my_user}/Projects/activepieces/packages/pieces/community/common/src/lib/polling/index.ts' is not under 'rootDir' '/home/{my_user}/Projects/activepieces/packages/pieces/community/sellsy'. 'rootDir' is expected to contain all source files.
4 export * from './lib/polling';
~~~~~~~~~~~~~~~
packages/pieces/community/common/src/index.ts:5:15 - error TS6059: File '/home/{my_user}/Projects/activepieces/packages/pieces/community/common/src/lib/ai/index.ts' is not under 'rootDir' '/home/{my_user}/Projects/activepieces/packages/pieces/community/sellsy'. 'rootDir' is expected to contain all source files.
The file is in the program because:
Imported via './lib/ai' from file '/home/{my_user}/Projects/activepieces/packages/pieces/community/common/src/index.ts'
Imported via '../..' from file '/home/{my_user}/Projects/activepieces/packages/pieces/community/common/src/lib/ai/providers/anthropic/index.ts'
Imported via '../..' from file '/home/{my_user}/Projects/activepieces/packages/pieces/community/common/src/lib/ai/providers/openai/index.ts'
Imported via '../index' from file '/home/{my_user}/Projects/activepieces/packages/pieces/community/common/src/lib/ai/providers/utils.ts'
Imported via '../..' from file '/home/{my_user}/Projects/activepieces/packages/pieces/community/common/src/lib/ai/providers/replicate/index.ts'
5 export * from './lib/ai';
~~~~~~~~~~
packages/pieces/community/common/src/lib/ai/providers/anthropic/index.ts:3:43
3 import { AI, AIChatRole, AIFactory } from '../..';
~~~~~~~
File is included via import here.
packages/pieces/community/common/src/lib/ai/providers/openai/index.ts:1:43
1 import { AI, AIChatRole, AIFactory } from '../..';
~~~~~~~
File is included via import here.
packages/pieces/community/common/src/lib/ai/providers/utils.ts:7:8
7 } from '../index';
~~~~~~~~~~
File is included via import here.
packages/pieces/community/common/src/lib/ai/providers/replicate/index.ts:4:43
4 import { AI, AIChatRole, AIFactory } from '../..';
~~~~~~~