metsrl / channel-rocketchat

Botpress 12.x.x / Rocket.Chat integration
GNU General Public License v3.0
11 stars 5 forks source link

Fail to build channel-rocketchat module on Windows #5

Open locnpsaigon opened 3 years ago

locnpsaigon commented 3 years ago

Here's console logs:

======================================= Error building module C:\Users\camel\Desktop\botpress\modules\channel-rocketchat

Status: error Command failed with exit code 1.

Output: info No lockfile found. [1/5] Validating package.json... [2/5] Resolving packages... [3/5] Fetching packages... [4/5] Linking dependencies... [5/5] Building fresh packages... success Saved lockfile. $ node ../../build/module-builder/bin/entry build --fail-on-error [module-builder] [ERROR] in C:/Users/camel/Desktop/botpress/modules/channel-rocketchat/src/backend/client.ts (103,21) TS2345: Argument of type '{ id: any; botId: string; channel: string; direction: "incoming"; payload: { text: any; user_info: { created: boolean; result: sdk.User; }; }; type: string; preview: any; target: any; }' is not assignable to parameter of type 'EventCtorArgs'. Object literal may only specify known properties, and 'id' does not exist in type 'EventCtorArgs'.

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

[11:43:03] 'build-module channel-rocketchat' errored after 30 s [11:43:03] Error: Command failed: cross-env npm_config_target_platform=darwin yarn && yarn build --fail-on-error error Command failed with exit code 1.

at ChildProcess.exithandler (child_process.js:295:12)
at ChildProcess.emit (events.js:210:5)
at ChildProcess.EventEmitter.emit (domain.js:499:23)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)

[11:43:03] 'build' errored after 19 min 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. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

C:\Users\camel\Desktop\botpress>yarn -v 1.22.5

Please help!

bollinim commented 3 years ago

Sorry i can't help you. Take into the account that the package script doesn't work on UNIX OS (Linux / MacOSX). I tried to solve the issue with the Botpress developer team but we figured out that the whole built process works only on Windows environment.

Regards

locnpsaigon commented 3 years ago

Sorry i can't help you. Take into the account that the package script doesn't work on UNIX OS (Linux / MacOSX). I tried to solve the issue with the Botpress developer team but we figured out that the whole built process works only on Windows environment.

Regards

Thanks for your promt response. I just built the channel-rocketchat module on Windows enviroment but the error occurred:

[module-builder] [ERROR] in C:/Botpress/botpress/modules/channel-rocketchat/src/backend/client.ts (103,21) TS2345: Argument of type '{ id: any; botId: string; channel: string; direction: "incoming"; payload: { text: any; user_info: { created: boolean; result: sdk.User; }; }; type: string; preview: any; target: any; }' is not assignable to parameter of type 'EventCtorArgs'. Object literal may only specify known properties, and 'id' does not exist in type 'EventCtorArgs'.

I used nodejs v12.18.0 and yarn 1.22.5. Please help me fix the problem.

Here's the full logs:

C:\Botpress\botpress>yarn yarn install v1.22.5 [1/5] Validating package.json... [2/5] Resolving packages... [3/5] Fetching packages... info fsevents@1.2.7: The platform "win32" is incompatible with this module. info "fsevents@1.2.7" is an optional dependency and failed compatibility check. Excluding it from installation. [4/5] Linking dependencies... warning " > bluebird-global@1.0.1" has unmet peer dependency "bluebird@*". warning " > bluebird-retry@0.11.0" has unmet peer dependency "bluebird@>=2.3.10". [5/5] Building fresh packages... Done in 245.24s.

C:\Botpress\botpress>yarn build yarn run v1.22.5 $ yarn cmd build $ yarn run gulp build $ C:\Botpress\botpress\node_modules.bin\gulp build [20:02:41] Using gulpfile C:\Botpress\botpress\gulpfile.js [20:02:41] Starting 'build'... [20:02:41] Starting 'build:sharedLite'... [20:02:41] Starting 'sharedLiteBuild'... warning package.json: No license field warning studio-ui0lite@1.0.0: No license field [1/4] Resolving packages... [2/4] Fetching packages... [3/4] Linking dependencies... [4/4] Building fresh packages... [20:02:42] Finished 'sharedLiteBuild' after 1.45 s [20:02:42] Finished 'build:sharedLite' after 1.46 s [20:02:42] Starting 'clearMigrations'... [20:02:42] Finished 'clearMigrations' after 20 ms [20:02:42] Starting 'maybeFetchPro'... [20:02:42] Finished 'maybeFetchPro' after 36 ms [20:02:42] Starting 'writeMetadata'... [20:02:42] Finished 'writeMetadata' after 71 ms [20:02:42] Starting 'compileTypescript'... [20:03:22] Finished 'compileTypescript' after 39 s [20:03:22] Starting 'buildSchemas'... [20:03:29] Finished 'buildSchemas' after 7.35 s [20:03:29] Starting 'createOutputDirs'... [20:03:29] Finished 'createOutputDirs' after 258 ms [20:03:29] Starting 'copyBinaries'... [20:03:29] Finished 'copyBinaries' after 9.09 ms [20:03:29] Starting 'copyPreTrained'... [20:03:30] Finished 'copyPreTrained' after 288 ms [20:03:30] Starting 'copyStopWords'... [20:03:30] Finished 'copyStopWords' after 33 ms [20:03:30] Starting 'build:shared'... [20:03:30] Starting 'cleanShared'... [20:03:30] Finished 'cleanShared' after 13 ms [20:03:30] Starting 'sharedBuild'... [1/5] Validating package.json... [2/5] Resolving packages... [3/5] Fetching packages... info fsevents@2.1.3: The platform "win32" is incompatible with this module. info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation. info fsevents@1.2.13: The platform "win32" is incompatible with this module. info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation. [4/5] Linking dependencies... warning " > ts-loader@6.2.2" has unmet peer dependency "typescript@*". [5/5] Building fresh packages... $ cross-env NODE_ENV=production node ./webpack.config.js --compile --nomap && yarn scss [20:06:10] Shared 393 modules

WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB). This can impact web performance. Assets: index.js (678 KiB)

WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance. Entrypoints: main (678 KiB) index.js

WARNING in webpack performance recommendations: You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application. For more info visit https://webpack.js.org/guides/code-splitting/ $ node-sass src/theme/main.scss dist/theme.css --importer=node_modules/node-sass-tilde-importer Rendering Complete, saving .css file... Wrote CSS to C:\Botpress\botpress\src\bp\ui-shared\dist\theme.css [20:06:14] Finished 'sharedBuild' after 2.73 min [20:06:14] Finished 'build:shared' after 2.73 min [20:06:14] Starting 'initStudio'... warning " > react-dock@0.2.4" has unmet peer dependency "babel-runtime@^6.3.13". warning "ui-shared > react-command-palette@0.12.0-0" has incorrect peer dependency "react@^16.12.0". warning "ui-shared > react-command-palette@0.12.0-0" has incorrect peer dependency "react-dom@^16.12.0". warning " > ts-loader@6.2.1" has unmet peer dependency "typescript@*". [20:08:59] Finished 'initStudio' after 2.73 min [20:08:59] Starting 'buildModuleBuilder'... [1/4] Resolving packages... [2/4] Fetching packages... info fsevents@1.2.11: The platform "win32" is incompatible with this module. info "fsevents@1.2.11" is an optional dependency and failed compatibility check. Excluding it from installation. info fsevents@1.2.4: The platform "win32" is incompatible with this module. info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... [4/4] Building fresh packages... $ ./node_modules/.bin/babel src --out-dir bin --extensions ".ts,.js" Successfully compiled 6 files with Babel.

[20:09:57] Finished 'buildModuleBuilder' after 58 s [20:09:57] Starting 'cleanSdk'... [20:09:57] Finished 'cleanSdk' after 76 ms [20:09:57] Starting 'build-module analytics'... [20:11:03] Finished 'build-module analytics' after 1.08 min [20:11:03] Starting 'build-module basic-skills'... [20:11:39] Finished 'build-module basic-skills' after 36 s [20:11:39] Starting 'build-module bot-improvement'... [20:12:09] Finished 'build-module bot-improvement' after 30 s [20:12:09] Starting 'build-module broadcast'... [20:12:55] Finished 'build-module broadcast' after 46 s [20:12:55] Starting 'build-module builtin'... [20:13:12] Finished 'build-module builtin' after 17 s [20:13:12] Starting 'build-module channel-messenger'... [20:13:32] Finished 'build-module channel-messenger' after 21 s [20:13:32] Starting 'build-module channel-rocketchat'...

======================================= Error building module C:\Botpress\botpress\modules\channel-rocketchat

Status: error Command failed with exit code 1.

Output: info No lockfile found. [1/5] Validating package.json... [2/5] Resolving packages... [3/5] Fetching packages... [4/5] Linking dependencies... [5/5] Building fresh packages... success Saved lockfile. $ node ../../build/module-builder/bin/entry build --fail-on-error [module-builder] [ERROR] in C:/Botpress/botpress/modules/channel-rocketchat/src/backend/client.ts (103,21) TS2345: Argument of type '{ id: any; botId: string; channel: string; direction: "incoming"; payload: { text: any; user_info: { created: boolean; result: sdk.User; }; }; type: string; preview: any; target: any; }' is not assignable to parameter of type 'EventCtorArgs'. Object literal may only specify known properties, and 'id' does not exist in type 'EventCtorArgs'.

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

[20:13:51] 'build-module channel-rocketchat' errored after 19 s [20:13:51] Error: Command failed: cross-env npm_config_target_platform=darwin yarn && yarn build --fail-on-error error Command failed with exit code 1.

at ChildProcess.exithandler (child_process.js:303:12)
at ChildProcess.emit (events.js:315:20)
at ChildProcess.EventEmitter.emit (domain.js:505:15)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)

[20:13:51] 'build' errored after 11 min 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. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

C:\Botpress\botpress>

Thanks, locnp.saigon