musonza / chat-demo Goto Github PK
View Code? Open in Web Editor NEWDemo Application for https://github.com/musonza/chat/
Demo Application for https://github.com/musonza/chat/
I wanna install it on infinityfree. can I do it?
HTTP422: UNPROCESSABLE ENTITY - The request was well-formed but could not be processed due to semantic errors. (XHR)POST - http://127.0.0.1:8000/chat/conversations/17/participants
`joinConversation: function joinConversation(id) {
var payload = {
'participants': [{
'id': window.participant && window.participant.id,
'type': window.participant && window.participant.type
}]
};
axios.post("/chat/conversations/" + id + "/participants", payload).then(function (response) {
window.location.href = "chat?conversation_id=" + id;
});`
The controller is same. As i faced it few people said i need to pass the right value . I did everything right.
But still can't figure out what is causing it.
I would really appreciate the help.
Thanks
After pulling the master branch and then run the command the php artisan serve. Interface gets loaded successfully but when click on New Conversation button it is giving 404 error.
http://127.0.0.1:8000/conversations
Route does not exist in web.php file.
Could you please guide what next to do to rectify this issue?
Thanks
I was experiencing an error when one of the chat_part messageable_id was not found in user_id so it made an participanttransformer.php error.
I hope there will be an improvement to check whether the participants in the users are there or not, so they don't make mistakes
thanks
I follow the above instruction horaceho@0e99f41 and re-run the demo.
Pusher is connected:
However, new message only shows up after manual refresh page (pressing Cmd-R, 1 & 2 are shown), the new message (e.g. enter 3 and click Send) does not show up in own window:
or remote window:
Any suggestion?
Originally posted by @horaceho in #15 (comment)
Hi Musonza,
Tried to implement pusher with the project.
Though pusher detects message passing. but it's not real-time in the app.
Any idea how to fix it?
npm ERR! gyp verb download contents checksum {"node-v20.11.1-headers.tar.gz":"0aa42c91b441e945ff43bd3a837759c58b436de57dcd033d02e5cbcd2fba1f87"}
npm ERR! gyp verb validating download checksum for node-v20.11.1-headers.tar.gz (0aa42c91b441e945ff43bd3a837759c58b436de57dcd033d02e5cbcd2fba1f87 == 0aa42c91b441e945ff43bd3a837759c58b436de57dcd033d02e5cbcd2fba1f87)
npm ERR! gyp verb get node dir target node version installed: 20.11.1
npm ERR! gyp verb build dir attempting to create "build" dir: /home/web/musonza/chat-demo/node_modules/node-sass/build
npm ERR! gyp verb build dir "build" dir needed to be created? /home/web/musonza/chat-demo/node_modules/node-sass/build
npm ERR! gyp verb build/config.gypi creating config file
npm ERR! gyp verb build/config.gypi writing out config file: /home/web/musonza/chat-demo/node_modules/node-sass/build/config.gypi
npm ERR! gyp verb config.gypi checking for gypi file: /home/web/musonza/chat-demo/node_modules/node-sass/config.gypi
npm ERR! gyp verb common.gypi checking for gypi file: /home/web/musonza/chat-demo/node_modules/node-sass/common.gypi
npm ERR! gyp verb gyp gyp format was not specified; forcing "make"
npm ERR! gyp info spawn /usr/bin/python2
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/home/web/musonza/chat-demo/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/web/musonza/chat-demo/node_modules/node-sass/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/web/musonza/chat-demo/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/web/.node-gyp/20.11.1/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/home/web/.node-gyp/20.11.1',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/home/web/musonza/chat-demo/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/home/web/.node-gyp/20.11.1/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/web/musonza/chat-demo/node_modules/node-sass',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! Traceback (most recent call last):
npm ERR! File "/home/web/musonza/chat-demo/node_modules/node-gyp/gyp/gyp_main.py", line 16, in <module>
npm ERR! sys.exit(gyp.script_main())
npm ERR! File "/home/web/musonza/chat-demo/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 545, in script_main
npm ERR! return main(sys.argv[1:])
npm ERR! File "/home/web/musonza/chat-demo/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 538, in main
npm ERR! return gyp_main(args)
npm ERR! File "/home/web/musonza/chat-demo/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 514, in gyp_main
npm ERR! options.duplicate_basename_check)
npm ERR! File "/home/web/musonza/chat-demo/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 130, in Load
npm ERR! params['parallel'], params['root_targets'])
npm ERR! File "/home/web/musonza/chat-demo/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 2783, in Load
npm ERR! variables, includes, depth, check, True)
npm ERR! File "/home/web/musonza/chat-demo/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 399, in LoadTargetBuildFile
npm ERR! includes, True, check)
npm ERR! File "/home/web/musonza/chat-demo/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 271, in LoadOneBuildFile
npm ERR! aux_data, includes, check)
npm ERR! File "/home/web/musonza/chat-demo/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 308, in LoadBuildFileIncludesIntoDict
npm ERR! LoadOneBuildFile(include, data, aux_data, None, False, check),
npm ERR! File "/home/web/musonza/chat-demo/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 251, in LoadOneBuildFile
npm ERR! None)
npm ERR! File "/home/web/.node-gyp/20.11.1/include/node/common.gypi", line 1
npm ERR! incremental linking
npm ERR! ^
npm ERR! SyntaxError: invalid syntax
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/home/web/musonza/chat-demo/node_modules/node-gyp/lib/configure.js:345:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:518:28)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
npm ERR! gyp ERR! System Linux 5.10.0-28-amd64
npm ERR! gyp ERR! command "/usr/local/bin/node" "/home/web/musonza/chat-demo/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /home/web/musonza/chat-demo/node_modules/node-sass
npm ERR! gyp ERR! node -v v20.11.1
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
how to solve this problem?
i had spent one hour download the demo then it broken!!!
man!!
Liked the look of the chat package, so checked out this demo app, but it's current status is not usable.
Running migrations gives a
Symfony\Component\Debug\Exception\FatalErrorException :
Cannot declare class CreateChatTables, because the name is already in use at
/chat-demo/database/migrations/2019_11_06_134235_create_chat_tables.php:104
Seems this is because there's two migration files currently in the repo:
2019_10_31_015755_create_chat_tables.php & 2019_11_06_134235_create_chat_tables.php
Removing one makes stuff work, but only briefly, loging in you can't start a new conversation as /routes 404's (see #12 )
Brief look through the history and reverting to commit #bdc8748 seemed to solve many of these issues - and while it might not be the latest and greatest way of using the package, it does let me see what the package does out of the box!
I appreciate what you're trying to do here, and love having a demo app to examine how packages are used, but wonder if having a more defined develop branch you can work on to showcase all features and a slower (tested 100% working branch) for people who just want to try it out and see if they like the look of it before diving deeper?
Warning: Ambiguous class resolution, "Illuminate\Database\Eloquent\Factory" was found 2x: in "/Users/ammadkhan/Docs/chat-demo-master/vendor/laravel/legacy-factories/src/Factory.php" and "/Users/ammadkhan/Docs/chat-demo-master/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factory.php", the first will be used.
Warning: Ambiguous class resolution, "Illuminate\Database\Eloquent\FactoryBuilder" was found 2x: in "/Users/ammadkhan/Docs/chat-demo-master/vendor/laravel/legacy-factories/src/FactoryBuilder.php" and "/Users/ammadkhan/Docs/chat-demo-master/vendor/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php", the first will be used.
Warning: Ambiguous class resolution, "Illuminate\Support\Traits\Macroable" was found 2x: in "/Users/ammadkhan/Docs/chat-demo-master/vendor/illuminate/macroable/Traits/Macroable.php" and "/Users/ammadkhan/Docs/chat-demo-master/vendor/laravel/framework/src/Illuminate/Support/Traits/Macroable.php", the first will be used.
Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover --ansi
In PackageManifest.php line 122:
Undefined index: name
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.