Troubles with the new Playground
See original GitHub issueI’m running into a host of problems with the new Playground setup that’s made local development impossible.
Running npm start
from within packages/playground
greets me with compilation errors like:
ERROR in ./src/index.js
Module not found: Error: Can't resolve '@rjsf/core' in '/Users/jon/code/react-jsonschema-form/packages/playground/src'
@ ./src/index.js 18:0-45 360:29-33 384:29-33 544:23-32 626:21-30 682:29-33
@ ./playground/app.js
@ multi webpack-hot-middleware/client?reload=true ./playground/app
Running the same from within packages/core
I get:
ERROR in ./playground/app.js
Module not found: Error: Can't resolve '@rjsf/playground' in '/Users/jon/code/react-jsonschema-form/packages/core/playground'
@ ./playground/app.js 3:0-42 10:27-37
@ multi webpack-hot-middleware/client?reload=true ./playground/app
I’ve run npm run bootstrap
from the root directory but still can’t get it booted. I am running the most current master
.
Am I doing something wrong?
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
New Playgrounds Are Safe—and That's Why Nobody Uses ...
The problem with safety guidelines is that they make most playgrounds so uninteresting as to contribute to reduced physical activity.
Read more >Playground Problems for Kids With Learning and Thinking ...
The playground can cause problems for kids who have trouble with motor skills, social skills, impulsivity and other issues. Learn why playground games...
Read more >5 Things to Avoid When Creating a New Playground
5 Things to Avoid When Creating a New Playground · Limit the Impact of Falls · Get Rid of Sharp Corners · Choose...
Read more >Unable to create a new Trailhead Playground
I'm trying to create a new playground, but am unable to do so. When I try to select create new trailhead playground, nothing...
Read more >"This is just for me and kids like me?!" New Evans playground ...
Program coordinator Jenni Grace said "A lot of typical playgrounds, they can be physically limiting for children who may have a wheelchair or ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Right – I hadn’t realized that
packages/core
doesn’t trigger Webpack builds in this setup. My bad, I should have made an issue to discuss development setup with multiple packages before going ahead and implementing what I did.I think an approach like what’s mentioned in https://github.com/rjsf-team/react-jsonschema-form/pull/1639#issuecomment-596596398 might fix this problem. We could use a single playground that we run from the
packages/playground
directory, and we usenpm link
so that the playground uses the local development version ofpackages/core
. We can also run a build script as in #1606 that watches files inpackages/core
and recompiles them whenever changes are made. This should live-reload the playground properly. What do you think?I had a ton of issues with regards to this, it is broken but for local development I did the following which works.
change reference to jsonschema-form in package.json of playground to reference local files in core i.e.
"react-json-schema-form": "file://../core"
this may also need changing in index.js back to react-jsonschema.form in import as @epicfaace’ s recent commit changed this then run npm build:lib in core and start in playground…
don’t push this change in PR as it will fail to build in CI.
I have wasted more than a day because of this not working properly, in my mind the lerna etc configuration is not there yet.
This is how I have been able to test my fixes in https://github.com/rjsf-team/react-jsonschema-form/pull/1610