codigoencasa / builderbot

🤖 Crear Chatbot WhatsApp en minutos. Únete a este proyecto OpenSource
https://www.builderbot.app
MIT License
2.33k stars 800 forks source link

intentando correrlo en UBUNTU #14

Closed sulivan22 closed 2 years ago

sulivan22 commented 2 years ago

Hola buenas.

Lo intente correr en un Ubuntu siguiendo tus instrucciones y em da el siguiente error.

sead@SEAD:~/Chatbot/bot-whatsapp$ npm i npm WARN test-ws-bot@1.0.0 No repository field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

audited 453 packages in 3.194s

26 packages are looking for funding run npm fund for details

found 3 moderate severity vulnerabilities run npm audit fix to fix them, or npm audit for details sead@SEAD:~/Chatbot/bot-whatsapp$

sead@SEAD:~/Chatbot/bot-whatsapp$ npm run start

test-ws-bot@1.0.0 start /home/sead/Chatbot/bot-whatsapp node ./app.js

/home/sead/Chatbot/bot-whatsapp/adapter/mysql.js:9 const key = response.?option_key || null ^

SyntaxError: Unexpected token ? at Module._compile (internal/modules/cjs/loader.js:723:23) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs/helpers.js:25:18) at Object. (/home/sead/Chatbot/bot-whatsapp/adapter/index.js:1:31) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! test-ws-bot@1.0.0 start: node ./app.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the test-ws-bot@1.0.0 start 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! /home/sead/.npm/_logs/2022-03-04T13_01_07_370Z-debug.log sead@SEAD:~/Chatbot/bot-whatsapp$

sead@SEAD:~/.npm/_logs$ cat 2022-03-04T13_01_07_370Z-debug.log 0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'start' ] 2 info using npm@6.14.4 3 info using node@v10.19.0 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle test-ws-bot@1.0.0~prestart: test-ws-bot@1.0.0 6 info lifecycle test-ws-bot@1.0.0~start: test-ws-bot@1.0.0 7 verbose lifecycle test-ws-bot@1.0.0~start: unsafe-perm in lifecycle true 8 verbose lifecycle test-ws-bot@1.0.0~start: PATH: /usr/share/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/sead/Chatbot/bot-whatsapp/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin 9 verbose lifecycle test-ws-bot@1.0.0~start: CWD: /home/sead/Chatbot/bot-whatsapp 10 silly lifecycle test-ws-bot@1.0.0~start: Args: [ '-c', 'node ./app.js' ] 11 silly lifecycle test-ws-bot@1.0.0~start: Returned: code: 1 signal: null 12 info lifecycle test-ws-bot@1.0.0~start: Failed to exec start script 13 verbose stack Error: test-ws-bot@1.0.0 start: node ./app.js 13 verbose stack Exit status 1 13 verbose stack at EventEmitter. (/usr/share/npm/node_modules/npm-lifecycle/index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:198:13) 13 verbose stack at ChildProcess. (/usr/share/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:198:13) 13 verbose stack at maybeClose (internal/child_process.js:982:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5) 14 verbose pkgid test-ws-bot@1.0.0 15 verbose cwd /home/sead/Chatbot/bot-whatsapp 16 verbose Linux 5.13.0-30-generic 17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "start" 18 verbose node v10.19.0 19 verbose npm v6.14.4 20 error code ELIFECYCLE 21 error errno 1 22 error test-ws-bot@1.0.0 start: node ./app.js 22 error Exit status 1 23 error Failed at the test-ws-bot@1.0.0 start script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ] sead@SEAD:~/.npm/_logs$

Excelente repo, gracias!

sulivan22 commented 2 years ago

finalmente quite la parte mysql que no la estaba utilizando y ya funciona en Ubuntu.