Unable to Build Source Code Version 12.3.0

I did just download source code . did follow steps 1. Yarn and then 2. Yarn Build
and got following errors.
error TS2430: Interface ‘ChainableInterface’ incorrectly extends interface ‘Pick<Promise, “catch” | “finally” | “asCallback” | “bind” | “delay” | “get” | “reflect” | “return” | “thenReturn” | “map” | “reduce” | “then” | “mapSeries” | “spread”>’.
The types returned by ‘asCallback(…)’ are incompatible between these types.
Type ‘this’ is not assignable to type ‘Bluebird’.
Type ‘ChainableInterface’ is missing the following properties from type ‘Bluebird’: [Symbol.toStringTag], caught, error, lastly, and 28 more.
src\bp\core\config\botpress.config.ts(1,10): error TS2440: Import declaration conflicts with local declaration of ‘ConverseConfig’.
src\bp\core\config\config-loader.ts(11,13): error TS2305: Module ‘"…/…/…/…/…/…/…/Nisarg/Project/botpress/node_modules/@types/lodash/ts3.1"’ has no exported
member ‘PartialDeep’.
src\bp\core\misc\utils.ts(33,74): error TS2314: Generic type ‘Matchers<R, T>’ requires 2 type argument(s).
src\bp\core\routers\admin\workspaces.ts(148,42): error TS2345: Argument of type ‘string’ is not assignable to parameter of type ‘RolloutStrategy’.
src\bp\core\routers\admin\workspaces.ts(152,73): error TS2322: Type ‘string’ is not assignable to type ‘“anonymous” | “anonymous-invite” | “authenticated” | “authenticated-invite” | “authorized” | undefined’.
src\bp\index.ts(57,28): error TS2345: Argument of type ‘{} | null | undefined’ is not assignable to parameter of type ‘Error’.
Type ‘undefined’ is not assignable to type ‘Error’.
src\bp\sdk\botpress.d.ts(1492,24): error TS2694: Namespace ‘_’ has no exported member ‘PartialDeep’.
TypeScript: 8 semantic errors
TypeScript: emit succeeded (with errors)
[07:34:21] ‘compileTypescript’ errored after 18 s
[07:34:21] Error: TypeScript: Compilation failed
at Output.mightFinish (d:\Nisarg\Project\botpress\node_modules\gulp-typescript\release\output.js:130:43)
at d:\Nisarg\Project\botpress\node_modules\gulp-typescript\release\output.js:65:22
[07:34:21] ‘build’ errored after 18 s
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
npm ERR! errno 1
npm ERR! botpress@12.3.2 build: yarn cmd build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the botpress@12.3.2 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\harish\AppData\Roaming\npm-cache_logs\2020-01-09T12_34_21_659Z-debug.log
The terminal process terminated with exit code: 1

I did update Knex but still no luck. I did not able to find documentation of this functions.

Hi and welcome to the community,

Which node version do you use? As hinted in the docs, please use version 10.11.0

1 Like

Hello asashour

I am using node version 12.9 .
I am not able to find 10.18 will try to build with that.
update here soon.

I tried with 10.18 and 10.11 as well still got same error. My yarn version is 1.21.1

anything i am missing here?

1 Like

I had many errors initially, and I remember I uninstalled all node version(s), deleted all Botpress sources, and started again.

I did uninstaill all node versions and download source code than install node again and Yarn again too. run build command and same issues raise once again.
Not able to figure out what is wrong.

What is the output of

tsc --version


mine is 3.7.2

Hello Mine is 3.3.4 will try once again with updating it through NPM.

Try to run yarn before yarn build.
I had similar problem, seems it was fixed by updating tsc.

Hello Anton_Trofimov and asashour
thanks for both of your help.
I finally able to build the code did take more than 2 Hours but without error code has been build with few warnings.

I wish they did mentioned about minimum required version of type script as well. because updating type script version to 3.7 did the job.

@nisargkdesai, thanks for the feedback.

Following “Be the change you want to see in the world”: 2838