reframejs/reframe

`No pages found` error using react-frontend starter

Closed this issue · 9 comments

Reframe looks really awesome in the docs, and I'm really interested in trying it out. However, I don't get very far before I get stuck. Following the quick start instructions with yarn or npm, when I try to run reframe dev (or npm run dev, or yarn dev), I run into this error:

****************************************
************* Wrong Usage **************
****************************************
No pages found.
Do your page config file names end with `.config.js`?

Here's the full output:

 ✔ Found project ~/code/examples/reframe-react-frontend/
         plugins @reframe/react-kit, @reframe/deploy-git
         Reframe config ~/code/examples/reframe-react-frontend/reframe.config.js

 ⠋ Building pages (for development)/Users/bmortenson/code/examples/reframe-react-frontend/node_modules/@reframe/cli/bin.js:5
process.on('unhandledRejection', err => {throw err});
                                         ^

****************************************
************* Stack Trace **************
****************************************
    at assert_config (/Users/bmortenson/code/examples/reframe-react-frontend/node_modules/webpack-ssr/Build.js:205:5)
    at getNodejsConfig (/Users/bmortenson/code/examples/reframe-react-frontend/node_modules/webpack-ssr/Build.js:110:5)
    at Function.<anonymous> (/Users/bmortenson/code/examples/reframe-react-frontend/node_modules/webpack-ssr/Build.js:75:30)
    at Generator.next (<anonymous>)
    at buildAll (/Users/bmortenson/code/examples/reframe-react-frontend/node_modules/@rebuild/iso/IsoBuilder.js:309:33)


****************************************
************* Wrong Usage **************
****************************************
No pages found.
Do your page config file names end with `.config.js`?

reframe build produces the same error.

The files are there:

> find pages
pages
pages/CounterPage.config.js
pages/TimePage.config.js
pages/GameOfThronesPage
pages/GameOfThronesPage/getJson.js
pages/GameOfThronesPage/views
pages/GameOfThronesPage/views/CharacterList.js
pages/GameOfThronesPage/GameOfThronesPage.config.js
pages/WelcomePage.config.js

I'm running node v10.16.0, npm 6.9.0, yarn 1.16.0, and @reframe/cli@0.3.2. I have tried other node versions, to no avail.

Interestingly, I get a different error using npx. It prints out 'building pages (for development)' twice, then hangs indefinitely.

⠋ Building pages (for development)
⠦ Building pages (for development)

I have also just tried using react-app and got the same error. It also doesn't matter whether I specify a directory name or it uses the default.

I'll have a look today or tomorrow

I couldn't reproduce this.

When I run the following, I don't get your error and everything seem to be fine.

  • I do a fresh install of @reframe/cli
  • I run reframe create react-frontend
  • I run cd my-react-frontend && reframe dev

Feel free to share your code with and I'll have a look at it.

I don't suspect the node version to be the cause here, but anyways:

$ node -v
v12.2.0
$ npm -v
6.9.0
$ yarn -v
1.16.0

Are you on windows?

@bgmort In what stack are you interested in? I'm currently writing starters for the new version of Reframe — cehck out the new readme: https://github.com/reframejs/reframe.

If you are merely interested in SSR then have a look at ssr-coin: https://github.com/reframejs/ssr-coin.

I'm on OSX. I tried again today, this time running node 12, and it worked fine. I also reinstalled @reframe/cli first. Perhaps I shouldn't have, as I changed two variables and it worked. But going back to node 10, and recreating the starter project, it still works fine now. I guess we could just chalk it up to something strange about my environment unless you hear more from other people about it.

I hadn't refreshed the page before I commented, and so I hadn't seen your latest comment yet. I'm interested in a statically hosted stack, both rendering to react to static html for non-interactive pages, and with client-side react for interactive ones.

I'm interested in a statically hosted stack, both rendering to react to static html for non-interactive pages, and with client-side react for interactive ones.

You can absolutely do that with ssr-coin. And it's actually the only SSR tool I'm aware of capable of that. I'm currently writing a reframe-static-website starter, I'll show it to you today / tomorrow.

@bgmort https://github.com/reframejs/reframe-static-website

I'll improve the example static website of the starter in the coming days to include code that showcases how to implement a page header, import css, async data at build-time, etc. But the ssr-coin API is settled for now; you can use the starter today.

Closing -- let me know if you run into any problems with the reframe-static-website starter.