GetStream / python-chat-example

Chat with Python, Django and React
https://getstream.io/chat/
48 stars 17 forks source link

Cant seem to get this started.. #2

Open Tedmcm opened 3 years ago

Tedmcm commented 3 years ago

I have followed the instructions 3 different time with this python package and cant get this to work. It gives me the same errors every time i cant solve, any help would be appreciated.. i have followed the error instructions all three times ( i git cloned the python repo and python example repo 3 seperate times) and i get the same error message and i have followed the instructions on how to fix and nothing will fix it.. I also tried the .env solution and it didnt work either.. couple of things i tried and dont understand..

  1. i thought it was either npm or yarn? I know python and not web dev so not 100% sure on some of these things.. I followed the instructions so i assume its yarn so thats what i was going by..
  2. there was no package-lock.json file as i was using yarn, so i deleted the yarn.lock and then the node modules..
  3. there was no babel-jest in the package.json file to delete.
  4. i then ran yarn... and then tried yarn start.. and it gives me this message.. or in the python example one it says there is no start... but in the package.json file there is

scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" },

  1. when i ran 1-4 in the error instructions it didnt work all three times..I used yarn so. i have tried to do yarn again.. and it just says already installed.. there was no instructions on how to set up with npm but i tried one time how i have done before but that just really blew things up (Would be good to have each steap on exactly how to set up both ways for newbies- each exact step).
  2. for # 6.. not exactly sure what they mean by this.. in one of my example i can see its there so how is it outside the project folder, chat example.. so if its in this folder how is it possibly outside the project folder? Doesnt really make sense to me?N
  3. I tried making the .env with the skip pre filght check into it and it didnt make a difference at all? (if it meant, put that in .env file and then try yarn start.. ) didnt work..

Thanks for any help, Not sure how to proceed here? the error message is below..

react-scripts start

There might be a problem with the project dependency tree. It is likely not a bug in Create React App, but something you need to fix locally.

The react-scripts package provided by Create React App requires a dependency:

"babel-jest": "24.7.1"

Don't try to install it manually: your package manager does it automatically. However, a different version of babel-jest was detected higher up in the tree:

/Users/edwardmcmillan/python-chat-example/chat-frontend/node_modules/babel-jest (version: 23.6.0)

Manually installing incompatible versions is known to cause hard-to-debug issues.

If you would prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project. That will permanently disable this message but you might encounter other issues.

To fix the dependency tree, try following the steps below in the exact order:

  1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
  2. Delete node_modules in your project folder.
  3. Remove "babel-jest" from dependencies and/or devDependencies in the package.json file in your project folder.
  4. Run npm install or yarn, depending on the package manager you use.

In most cases, this should be enough to fix the problem. If this has not helped, there are a few other things you can try:

  1. If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead. This may help because npm has known issues with package hoisting which may get resolved in future versions.

  2. Check if /Users/edwardmcmillan/python-chat-example/chat-frontend/node_modules/babel-jest is outside your project directory. For example, you might have accidentally installed something in your home folder.

  3. Try running npm ls babel-jest in your project folder. This will tell you which other package (apart from the expected react-scripts) installed babel-jest.

If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project. That would permanently disable this preflight check in case you want to proceed anyway.

P.S. We know this message is long but please read the steps above :-) We hope you find them helpful!

error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. (chatexample) (base) edwardmcmillan@edwards-MBP chat-frontend %

tbarbugli commented 3 years ago

@nparsons08 ^^^