strapi / strapi-starter-react-blog

Strapi Starter React Blog
https://strapi.io/blog/strapi-starter-react-blog?redirectPage=1
122 stars 59 forks source link

"yarn develop --watch-admin" doesn't work for backend #13

Open ikkev opened 4 years ago

ikkev commented 4 years ago

node version v12.16.1 yarn version 1.22.4

how to reproduce

git clone https://github.com/strapi/strapi-starter-react-blog.git
cd strapi-starter-react-blog
cd backend
yarn
yarn develop --watch-admin

what happens

duplicate packages warnings:

 WARNING  Compiled with 3 warnings                                                                                                                                                                                                  

 warning  

@babel/runtime
  Multiple versions of @babel/runtime found:
    7.10.1 ./~/dom-helpers/~/@babel/runtime from ./~/dom-helpers/cjs/addClass.js
    7.7.7 ./~/@babel/runtime from ./~/@babel/runtime/helpers/slicedToArray.js

 warning  

dom-helpers
  Multiple versions of dom-helpers found:
    5.1.3 ./~/react-virtualized/~/dom-helpers from ./~/react-virtualized/~/dom-helpers/cjs/scrollbarSize.js
    5.1.4 ./~/dom-helpers from ./~/react-transition-group/cjs/CSSTransition.js

 warning  

regenerator-runtime
  Multiple versions of regenerator-runtime found:
    0.13.3 ./~/@babel/runtime/~/regenerator-runtime from ./~/@babel/runtime/regenerator/index.js
    0.13.5 ./~/regenerator-runtime from ./~/@babel/polyfill/lib/noConflict.js

Check how you can resolve duplicate packages: 
https://github.com/darrenscerri/duplicate-package-checker-webpack-plugin#resolving-duplicate-packages-in-your-bundle

Browser opens to http://localhost:8000/ trying to show the admin, but shows the loading icon forever. No errors or warnings in console or network. Also tries to open http://0.0.0.0:1337/admin for some reason, but that shows this:

{
"statusCode": 404,
"error": "Not Found",
"message": "Not Found"
}

Api seems to work correctly at http://localhost:1337/

This command works fine when strapi is created using yarn create strapi-app my-project. So I feel its related to this starter react blog.

The yarn develop (without --watch-admin) command works ok for the starter react blog.

laazebislam commented 4 years ago

man i am facing the same issue, did you find any solution??

ikkev commented 4 years ago

@laazebislam No sorry, have not found a solution. I now manually restart every time I made some admin template changes, which is quite annoying.

Mcastres commented 4 years ago

I move the backend on it's own repository here https://github.com/strapi/strapi-starter-blog Can you confirm that you still have this issue?