I just started the tutorials a few minutes ago.
I followed the steps exactly as instructed.
yarn create redwood-app ./redwoodblog
cd redwoodblog
yarn redwood dev
I got a reference error because NotFoundPage wasn't being imported into the Routes.js file. Same with HomePage. I'm not sure if you've changed the behavior of the framework or if the docs are just misleading because It also says the following.
If you look in Routes you'll notice that we're referencing a component, HomePage, that isn't imported anywhere. Redwood automatically imports all pages in the Routes file since we're going to need to reference them all anyway. It saves a potentially huge import declaration from cluttering up the routes file.
Hello! Are you running the latest version of Redwood, 0.8.2? We had a bug in 0.8.0 that messed up the imports. You can run yarn redwood upgrade to get the latest version (assuming you're on at least 0.7.0 when we added that upgrade command). When you get the prompt asking you which packages to upgrade you can hit a to do them all.
Yes I am on version 0.8.2
Can you run yarn rw info and paste the output in here? Thanks!
System:
OS: Windows 10 10.0.18363
Binaries:
Node: 13.10.1 - ~\AppData\Local\Temp\yarn--1591317618297-0
.0020707390204257603\node.CMD
Yarn: 1.22.4 - ~\AppData\Local\Temp\yarn--1591317618297-0.
0020707390204257603\yarn.CMD
Browsers:
Edge: 44.18362.449.0
npmPackages:
@redwoodjs/core: ^0.8.2 => 0.8.2
Hmmm we're still finding hiccups in Windows from time to time. Let me see if I can find a Windows person to help with this, I'll be back! It might not be until tomorrow, though.
If you have any Linux VMs running you could try those first few steps of the tutorial in one of those and see if you can move past that point. Most of us are on Macs and we haven't seen the issue you're describing.
I have a macbook. I'll try it on that and report back.
It works perfectly fine on my macbook. No need to explicitly import anything.
Hello! I watched Rob's tutorial on Youtube last night and wanted to get stuck in to this exciting new way of working. I fired up my Windows machine this morning, opened the tutorial on the RedwoodJS site, and immediately came unstuck on the first step. It looks like I've encountered the same issue @AWey95 ran into.
I got "NotFoundPage is not defined" the first time I ran yarn redwood dev. Explicitly including import NotFoundPage from 'src/pages/NotFoundPage' near the top of web\src\Routes.js gave me the desired result.
Still really hyped to give RedwoodJS a fair shake, so I'll keep going.
Many thanks, Jim
Sorry about that @jimgroome we鈥檙e looking into it!
Reproduced with v0.8.2 on Windows 10:
Routes
C:/Users/User/Documents/GitHub/xx delete/xx-delete/web/src/Routes.js:13
10 | import { Router, Route } from '@redwoodjs/router'
11 |
12 | const Routes = () => {
> 13 | return (
14 | <Router>
15 | <Route notfound page={NotFoundPage} />
16 | </Router>
renderWithHooks
C:/Users/User/Documents/GitHub/xx delete/xx-delete/node_modules/react-dom/cjs/react-dom.development.js:14803
14800 | }
14801 | }
14802 |
> 14803 | var children = Component(props, secondArg); // Check if there was a render phase update
| ^
14804 |
14805 | if (workInProgress.expirationTime === renderExpirationTime) {
14806 | // Keep rendering in a loop for as long as render phase updates continue to
mountIndeterminateComponent
C:/Users/User/Documents/GitHub/xx delete/xx-delete/node_modules/react-dom/cjs/react-dom.development.js:17482
17479 |
17480 | setIsRendering(true);
17481 | ReactCurrentOwner$1.current = workInProgress;
> 17482 | value = renderWithHooks(null, workInProgress, Component, props, context, renderExpirationTime);
| ^
17483 | setIsRendering(false);
17484 | } // React DevTools reads this flag.
17485 |
beginWork
C:/Users/User/Documents/GitHub/xx delete/xx-delete/node_modules/react-dom/cjs/react-dom.development.js:18596
18593 | switch (workInProgress.tag) {
18594 | case IndeterminateComponent:
18595 | {
> 18596 | return mountIndeterminateComponent(current, workInProgress, workInProgress.type, renderExpirationTime);
| ^
18597 | }
18598 |
18599 | case LazyComponent:
callCallback
C:/Users/User/Documents/GitHub/xx delete/xx-delete/node_modules/react-dom/cjs/react-dom.development.js:188
185 | window.event = windowEvent;
186 | }
187 |
> 188 | func.apply(context, funcArgs);
| ^
189 | didError = false;
190 | } // Create a global error event handler. We use this to capture the value
191 | // that was thrown. It's possible that this error handler will fire more
This is now fixed, please upgrade to v0.9.1 by running yarn rw upgrade
This is now fixed, please upgrade to
v0.9.1by runningyarn rw upgrade
Thank you for the update! Very happy about this. Good work! J