question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Troubles with the new Playground

See original GitHub issue

I’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:closed
  • Created 4 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
epicfaacecommented, Mar 10, 2020

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 use npm link so that the playground uses the local development version of packages/core. We can also run a build script as in #1606 that watches files in packages/core and recompiles them whenever changes are made. This should live-reload the playground properly. What do you think?

1reaction
Saulzicommented, Mar 5, 2020

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found