Redwood: webpack cell loader not detecting the Cell files on Windows

Created on 16 Mar 2020  路  3Comments  路  Source: redwoodjs/redwood

I was trying the redwood blog tutorial (https://redwoodjs.com/tutorial/welcome-to-redwood) on Windows 10. I could try upto Layouts topic. But I could not proceed with getting dynamic topic (https://redwoodjs.com/tutorial/getting-dynamic). I created the posts using the following command:
yarn rw g scaffold post
and then I opened Posts Page page in the chrome browser. I got 'something went wrong ' page.

Warnings from react on the console:

react.development.js:315 Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check the render method of `PostsPage`.
    in PostsPage (created by PageLoader)
    in PageLoader (created by RouterImpl)
    in RouterImpl (created by LocationProvider)
    in LocationProvider (created by Context.Consumer)
    in Location (created by Router)
    in Router (created by Routes)
    in Routes
    in ApolloProvider (created by GraphQLProvider)
    in GraphQLProvider (created by RedwoodProvider)
    in RedwoodProvider
    in FatalErrorBoundary

After debugging , I understood the webpack cell loader is not detecting the file /web/components/PostsCell/PostsCell.js.

Changed the test regex for Cells files under @redwoodjscoreconfigwebpack.common.js:

{
          test: /web\\src\\components\\.+Cell.js$/,
          use: {
            loader: path.resolve(
              __dirname,
              '..',
              'dist',
              'loaders',
              'cell-loader'
            ),
          },
 }

Posts Page is displayed on the browser

Please suggest appropriate solution to this problem.

bu2-confirmed kinbug

All 3 comments

Experiencing the same issue.

Thanks for this. I'll get a fix and release out in the next few hours.

I'll release a new version of create-redwood-app, in the meantime you can bump @redwoodjs/core to 0.2.3

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aldonline picture aldonline  路  3Comments

slavakurilyak picture slavakurilyak  路  4Comments

wispyco picture wispyco  路  3Comments

weaversam8 picture weaversam8  路  4Comments

cannikin picture cannikin  路  3Comments