chakra-ui / frontity-chakra-ui-theme Goto Github PK
View Code? Open in Web Editor NEWA Frontity theme built with Chakra UI
Home Page: https://githubbox.com/chakra-ui/frontity-chakra-ui-theme
A Frontity theme built with Chakra UI
Home Page: https://githubbox.com/chakra-ui/frontity-chakra-ui-theme
please or anything does not change in this theme
If you install the frontity-chakra-ui-theme
in a Frontity project, and point it to a WordPress where you just have one post, it stops working and it returns this error:
TypeError: Cannot destructure property `title` of 'undefined' or 'null'.
at SecondaryPostPreview (webpack-internal:///./packages/frontity-chakra-theme/src/components/featured-post/featured-post.js:13:2258)
at processChild (webpack-internal:///./node_modules/react-dom/cjs/react-dom-server.node.development.js:480:2385)
at resolve (webpack-internal:///./node_modules/react-dom/cjs/react-dom-server.node.development.js:479:122)
at ReactDOMServerRenderer.render (webpack-internal:///./node_modules/react-dom/cjs/react-dom-server.node.development.js:516:1153)
at ReactDOMServerRenderer.read (webpack-internal:///./node_modules/react-dom/cjs/react-dom-server.node.development.js:516:55)
at renderToString (webpack-internal:///./node_modules/react-dom/cjs/react-dom-server.node.development.js:555:116)
at eval (webpack-internal:///./node_modules/@frontity/core/src/server/index.tsx:45:243)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at eval (webpack-internal:///./node_modules/koa-mount/index.js:16:290)
It seems that the theme is expecting to find a second post (I guess for the homepage, for the first three posts), and as it doesn't exists it returns that error.
It'd be nice to keep up with the latest improvements in Frontity:
https://docs.frontity.org/guides/keep-frontity-updated
HI,
it appears the search feature does not work on a default install. have tried a few things, just throwing undefined errors.
please can you look at this issue?
Data objects now have a data.isSearch
attribute like this:
<SearchResults when={data.isSearch} />
And also data.searchQuery
, so there's no need for extracting that from the query anymore, like here: https://github.com/chakra-ui/frontity-chakra-ui-theme/blob/master/packages/frontity-chakra-theme/src/components/search/search-results.js#L85-L86
./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/CloseButton/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: D:\Andolasoft Projects\AS_Blog\packages\frontity-chakra-theme\node_modules@chakra-ui\core\dist\es\CloseButton\index.js: pragma and pragmaFrag cannot be set when runtime is automatic.
1 | import _extends from "@babel/runtime/helpers/extends";
| ^
2 | import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3 |
4 | /* @jsx jsx /
at File.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\core\lib\transformation\file\file.js:249:12)
at NodePath.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\index.js:139:21)
at PluginPass.enter (D:\Andolasoft Projects\AS_Blog\node_modules@babel\plugin-transform-react-jsx\lib\create-plugin.js:164:28)
at newFn (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\visitors.js:177:21)
at NodePath._call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:40:17)
at NodePath.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:90:31)
at TraversalContext.visitQueue (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:103:16)
at TraversalContext.visitSingle (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:77:19)
at TraversalContext.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:131:19)
@ ./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/index.js 5:656-706 5:656-706
@ ./packages/frontity-chakra-theme/src/components/styles/processors.js
@ ./packages/frontity-chakra-theme/src/index.js
@ ./build/bundling/entry-points/chakra-react/client.ts
@ multi webpack-hot-middleware/client ./build/bundling/entry-points/chakra-react/client.ts
./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/Code/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: D:\Andolasoft Projects\AS_Blog\packages\frontity-chakra-theme\node_modules@chakra-ui\core\dist\es\Code\index.js: pragma and pragmaFrag
cannot be set when runtime is automatic.
1 | import _extends from "@babel/runtime/helpers/extends";
| ^
2 | import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3 |
4 | /* @jsx jsx /
at File.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\core\lib\transformation\file\file.js:249:12)
at NodePath.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\index.js:139:21)
at PluginPass.enter (D:\Andolasoft Projects\AS_Blog\node_modules@babel\plugin-transform-react-jsx\lib\create-plugin.js:164:28)
at newFn (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\visitors.js:177:21)
at NodePath._call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:40:17)
at NodePath.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:90:31)
at TraversalContext.visitQueue (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:103:16)
at TraversalContext.visitSingle (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:77:19)
at TraversalContext.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:131:19)
@ ./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/index.js 5:522-558 5:522-558
@ ./packages/frontity-chakra-theme/src/components/styles/processors.js
@ ./packages/frontity-chakra-theme/src/index.js
@ ./build/bundling/entry-points/chakra-react/client.ts
@ multi webpack-hot-middleware/client ./build/bundling/entry-points/chakra-react/client.ts
./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/Collapse/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: D:\Andolasoft Projects\AS_Blog\packages\frontity-chakra-theme\node_modules@chakra-ui\core\dist\es\Collapse\index.js: pragma and pragmaFrag cannot be set when runtime is automatic.
1 | import _extends from "@babel/runtime/helpers/extends";
| ^
2 | import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3 |
4 | /* @jsx jsx /
at File.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\core\lib\transformation\file\file.js:249:12)
at NodePath.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\index.js:139:21)
at PluginPass.enter (D:\Andolasoft Projects\AS_Blog\node_modules@babel\plugin-transform-react-jsx\lib\create-plugin.js:164:28)
at newFn (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\visitors.js:177:21)
at NodePath._call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:40:17)
at NodePath.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:90:31)
at TraversalContext.visitQueue (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:103:16)
at TraversalContext.visitSingle (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:77:19)
at TraversalContext.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:131:19)
@ ./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/index.js 5:706-750 5:706-750
@ ./packages/frontity-chakra-theme/src/components/styles/processors.js
@ ./packages/frontity-chakra-theme/src/index.js
@ ./build/bundling/entry-points/chakra-react/client.ts
@ multi webpack-hot-middleware/client ./build/bundling/entry-points/chakra-react/client.ts
./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/ColorModeProvider/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: D:\Andolasoft Projects\AS_Blog\packages\frontity-chakra-theme\node_modules@chakra-ui\core\dist\es\ColorModeProvider\index.js: pragma and pragmaFrag cannot be set when runtime is automatic.
1 | import _extends from "@babel/runtime/helpers/extends";
| ^
2 |
3 | /* @jsx jsx /
4 | import { jsx } from "@emotion/core";
at File.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\core\lib\transformation\file\file.js:249:12)
at NodePath.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\index.js:139:21)
at PluginPass.enter (D:\Andolasoft Projects\AS_Blog\node_modules@babel\plugin-transform-react-jsx\lib\create-plugin.js:164:28)
at newFn (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\visitors.js:177:21)
at NodePath._call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:40:17)
at NodePath.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:90:31)
at TraversalContext.visitQueue (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:103:16)
at TraversalContext.visitSingle (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:77:19)
at TraversalContext.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:131:19)
@ ./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/index.js 5:798-860 5:798-860 5:860-893 5:860-893
@ ./packages/frontity-chakra-theme/src/components/styles/processors.js
@ ./packages/frontity-chakra-theme/src/index.js
@ ./build/bundling/entry-points/chakra-react/client.ts
@ multi webpack-hot-middleware/client ./build/bundling/entry-points/chakra-react/client.ts
./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/Divider/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: D:\Andolasoft Projects\AS_Blog\packages\frontity-chakra-theme\node_modules@chakra-ui\core\dist\es\Divider\index.js: pragma and pragmaFrag cannot be set when runtime is automatic.
1 | import _extends from "@babel/runtime/helpers/extends";
| ^
2 | import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3 |
4 | /* @jsx jsx /
at File.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\core\lib\transformation\file\file.js:249:12)
at NodePath.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\index.js:139:21)
at PluginPass.enter (D:\Andolasoft Projects\AS_Blog\node_modules@babel\plugin-transform-react-jsx\lib\create-plugin.js:164:28)
at newFn (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\visitors.js:177:21)
at NodePath._call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:40:17)
at NodePath.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:90:31)
at TraversalContext.visitQueue (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:103:16)
at TraversalContext.visitSingle (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:77:19)
at TraversalContext.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:131:19)
@ ./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/index.js 5:1063-1105 5:1063-1105
@ ./packages/frontity-chakra-theme/src/components/styles/processors.js
@ ./packages/frontity-chakra-theme/src/index.js
@ ./build/bundling/entry-points/chakra-react/client.ts
@ multi webpack-hot-middleware/client ./build/bundling/entry-points/chakra-react/client.ts
./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/Drawer/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: D:\Andolasoft Projects\AS_Blog\packages\frontity-chakra-theme\node_modules@chakra-ui\core\dist\es\Drawer\index.js: pragma and pragmaFrag cannot be set when runtime is automatic.
1 | import _extends from "@babel/runtime/helpers/extends";
| ^
2 | import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3 |
4 | /* @jsx jsx /
at File.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\core\lib\transformation\file\file.js:249:12)
at NodePath.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\index.js:139:21)
at PluginPass.enter (D:\Andolasoft Projects\AS_Blog\node_modules@babel\plugin-transform-react-jsx\lib\create-plugin.js:164:28)
at newFn (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\visitors.js:177:21)
at NodePath._call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:40:17)
at NodePath.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:90:31)
at TraversalContext.visitQueue (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:103:16)
at TraversalContext.visitSingle (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:77:19)
at TraversalContext.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:131:19)
@ ./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/index.js 5:1105-1127 5:1105-1127
@ ./packages/frontity-chakra-theme/src/components/styles/processors.js
@ ./packages/frontity-chakra-theme/src/index.js
@ ./build/bundling/entry-points/chakra-react/client.ts
@ multi webpack-hot-middleware/client ./build/bundling/entry-points/chakra-react/client.ts
./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/Editable/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: D:\Andolasoft Projects\AS_Blog\packages\frontity-chakra-theme\node_modules@chakra-ui\core\dist\es\Editable\index.js: pragma and pragmaFrag cannot be set when runtime is automatic.
1 | import _defineProperty from "@babel/runtime/helpers/defineProperty";
| ^
2 | import _extends from "@babel/runtime/helpers/extends";
3 | import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
4 |
at File.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\core\lib\transformation\file\file.js:249:12)
at NodePath.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\index.js:139:21)
at PluginPass.enter (D:\Andolasoft Projects\AS_Blog\node_modules@babel\plugin-transform-react-jsx\lib\create-plugin.js:164:28)
at newFn (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\visitors.js:177:21)
at NodePath._call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:40:17)
at NodePath.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:90:31)
at TraversalContext.visitQueue (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:103:16)
at TraversalContext.visitSingle (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:77:19)
at TraversalContext.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:131:19)
@ ./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/index.js 5:1127-1171 5:1127-1171 5:1171-1195 5:1171-1195
@ ./packages/frontity-chakra-theme/src/components/styles/processors.js
@ ./packages/frontity-chakra-theme/src/index.js
@ ./build/bundling/entry-points/chakra-react/client.ts
@ multi webpack-hot-middleware/client ./build/bundling/entry-points/chakra-react/client.ts
./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/FormControl/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: D:\Andolasoft Projects\AS_Blog\packages\frontity-chakra-theme\node_modules@chakra-ui\core\dist\es\FormControl\index.js: pragma and pragmaFrag cannot be set when runtime is automatic.
1 | import _extends from "@babel/runtime/helpers/extends";
| ^
2 | import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3 |
4 | /* @jsx jsx /
at File.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\core\lib\transformation\file\file.js:249:12)
at NodePath.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\index.js:139:21)
at PluginPass.enter (D:\Andolasoft Projects\AS_Blog\node_modules@babel\plugin-transform-react-jsx\lib\create-plugin.js:164:28)
at newFn (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\visitors.js:177:21)
at NodePath._call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:40:17)
at NodePath.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:90:31)
at TraversalContext.visitQueue (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:103:16)
at TraversalContext.visitSingle (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:77:19)
at TraversalContext.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:131:19)
@ ./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/index.js 5:1231-1281 5:1231-1281 5:1281-1308 5:1281-1308
@ ./packages/frontity-chakra-theme/src/components/styles/processors.js
@ ./packages/frontity-chakra-theme/src/index.js
@ ./build/bundling/entry-points/chakra-react/client.ts
@ multi webpack-hot-middleware/client ./build/bundling/entry-points/chakra-react/client.ts
./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/FormErrorMessage/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: D:\Andolasoft Projects\AS_Blog\packages\frontity-chakra-theme\node_modules@chakra-ui\core\dist\es\FormErrorMessage\index.js: pragma and pragmaFrag cannot be set when runtime is automatic.
1 | import _extends from "@babel/runtime/helpers/extends";
| ^
2 | import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3 |
4 | /* @jsx jsx /
at File.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\core\lib\transformation\file\file.js:249:12)
at NodePath.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\index.js:139:21)
at PluginPass.enter (D:\Andolasoft Projects\AS_Blog\node_modules@babel\plugin-transform-react-jsx\lib\create-plugin.js:164:28)
at newFn (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\visitors.js:177:21)
at NodePath._call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:40:17)
at NodePath.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:90:31)
at TraversalContext.visitQueue (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:103:16)
at TraversalContext.visitSingle (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:77:19)
at TraversalContext.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:131:19)
@ ./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/index.js 5:1410-1470 5:1410-1470
@ ./packages/frontity-chakra-theme/src/components/styles/processors.js
@ ./packages/frontity-chakra-theme/src/index.js
@ ./build/bundling/entry-points/chakra-react/client.ts
@ multi webpack-hot-middleware/client ./build/bundling/entry-points/chakra-react/client.ts
./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/FormHelperText/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: D:\Andolasoft Projects\AS_Blog\packages\frontity-chakra-theme\node_modules@chakra-ui\core\dist\es\FormHelperText\index.js: pragma and pragmaFrag cannot be set when runtime is automatic.
1 | import _extends from "@babel/runtime/helpers/extends";
| ^
2 |
3 | /* @jsx jsx /
4 | import { jsx } from "@emotion/core";
at File.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\core\lib\transformation\file\file.js:249:12)
at NodePath.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\index.js:139:21)
at PluginPass.enter (D:\Andolasoft Projects\AS_Blog\node_modules@babel\plugin-transform-react-jsx\lib\create-plugin.js:164:28)
at newFn (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\visitors.js:177:21)
at NodePath._call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:40:17)
at NodePath.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:90:31)
at TraversalContext.visitQueue (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:103:16)
at TraversalContext.visitSingle (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:77:19)
at TraversalContext.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:131:19)
@ ./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/index.js 5:1308-1364 5:1308-1364
@ ./packages/frontity-chakra-theme/src/components/styles/processors.js
@ ./packages/frontity-chakra-theme/src/index.js
@ ./build/bundling/entry-points/chakra-react/client.ts
@ multi webpack-hot-middleware/client ./build/bundling/entry-points/chakra-react/client.ts
./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/FormLabel/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: D:\Andolasoft Projects\AS_Blog\packages\frontity-chakra-theme\node_modules@chakra-ui\core\dist\es\FormLabel\index.js: pragma and pragmaFrag cannot be set when runtime is automatic.
1 | import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
| ^
2 | import _extends from "@babel/runtime/helpers/extends";
3 |
4 | /* @jsx jsx /
at File.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\core\lib\transformation\file\file.js:249:12)
at NodePath.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\index.js:139:21)
at PluginPass.enter (D:\Andolasoft Projects\AS_Blog\node_modules@babel\plugin-transform-react-jsx\lib\create-plugin.js:164:28)
at newFn (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\visitors.js:177:21)
at NodePath._call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:40:17)
at NodePath.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:90:31)
at TraversalContext.visitQueue (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:103:16)
at TraversalContext.visitSingle (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:77:19)
at TraversalContext.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:131:19)
@ ./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/index.js 5:1364-1410 5:1364-1410
@ ./packages/frontity-chakra-theme/src/components/styles/processors.js
@ ./packages/frontity-chakra-theme/src/index.js
@ ./build/bundling/entry-points/chakra-react/client.ts
@ multi webpack-hot-middleware/client ./build/bundling/entry-points/chakra-react/client.ts
./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/Heading/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: D:\Andolasoft Projects\AS_Blog\packages\frontity-chakra-theme\node_modules@chakra-ui\core\dist\es\Heading\index.js: pragma and pragmaFrag cannot be set when runtime is automatic.
1 | import _extends from "@babel/runtime/helpers/extends";
| ^
2 | import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3 |
4 | /* @jsx jsx /
at File.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\core\lib\transformation\file\file.js:249:12)
at NodePath.buildCodeFrameError (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\index.js:139:21)
at PluginPass.enter (D:\Andolasoft Projects\AS_Blog\node_modules@babel\plugin-transform-react-jsx\lib\create-plugin.js:164:28)
at newFn (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\visitors.js:177:21)
at NodePath._call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:40:17)
at NodePath.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\path\context.js:90:31)
at TraversalContext.visitQueue (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:103:16)
at TraversalContext.visitSingle (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:77:19)
at TraversalContext.visit (D:\Andolasoft Projects\AS_Blog\node_modules@babel\traverse\lib\context.js:131:19)
@ ./packages/frontity-chakra-theme/node_modules/@chakra-ui/core/dist/es/index.js 5:1506-1548 5:1506-1548
@ ./packages/frontity-chakra-theme/src/components/styles/processors.js
@ ./packages/frontity-chakra-theme/src/index.js
@ ./build/bundling/entry-points/chakra
{
"name": "my-frontity-project",
"version": "1.0.0",
"private": true,
"description": "Frontity project",
"keywords": [
"frontity"
],
"scripts": {
"dev": "frontity dev",
"build": "frontity build",
"serve": "npx frontity serve"
},
"repository": {
"type": "git",
"url": "git+https://github.com/chakra-ui/frontity-chakra-ui-theme.git"
},
"author": "Segun Adebayo [email protected]",
"license": "MIT",
"bugs": {
"url": "https://github.com/chakra-ui/frontity-chakra-ui-theme/issues"
},
"homepage": "https://github.com/chakra-ui/frontity-chakra-ui-theme#readme",
"prettier": {},
"dependencies": {
"@chakra-ui/core": "^0.8.0",
"@emotion/core": "^11.0.0",
"@fontsource/work-sans": "^4.5.1",
"@frontity/core": "^1.14.3",
"@frontity/html2react": "^1.7.0",
"@frontity/tiny-router": "^1.4.4",
"@frontity/wp-comments": "^1.0.0",
"@frontity/wp-source": "^1.11.5",
"@frontity/yoast": "^2.1.1",
"frontity": "^1.17.0",
"frontity-chakra-theme": "./packages/frontity-chakra-theme",
"frontity-contact-form-7": "^0.1.7"
},
"devDependencies": {
"@babel/core": "^7.15.4",
"@babel/preset-env": "^7.15.4",
"@changesets/changelog-github": "^0.4.1",
"@changesets/cli": "2.17.0",
"babel-loader": "^8.2.2",
"eslint": "7.32.0",
"eslint-plugin-react": "7.25.1",
"webpack": "^5.51.2"
}
}
If you go to https://frontity-chakra.now.sh/page/2/ you will see that the pagination is disabled for the next and the previous page:
By a quick look at the code, it seems like the isDisabled
attribute should be the opposite of what it is right now:
https://github.com/chakra-ui/frontity-chakra-ui-theme/blob/master/packages/frontity-chakra-theme/src/components/archive/pagination.js#L87-L88
<PrevLink link={nextPageLink} isDisabled={!isTherePreviousPage} />
<NextLink link={prevPageLink} isDisabled={!isThereNextPage} />
I ran the frontity chakra theme I just installed from this Github repo and once I ran it I got following errors in the Devtools console:
You have illegal escape sequence in your template literal, most likely inside content's property value.
Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\00d7';" should become "content: '\\00d7';".
You can read more about this here:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences
2 of them were from the path eval @ webpack-internal:///…e.browser.esm.js:14
and
3 of them were from the path serializeStyles @ webpack-internal:///…e.browser.esm.js:12
Warning: validateDOMNesting(...): <a> cannot appear as a descendant of <a>.
in a (created by Context.Consumer)
in PseudoBox
in Unknown (created by PostCategories)
in div (created by Context.Consumer)
in PseudoBox (created by PostCategory)
in PostCategory (created by PostCategories)
in div (created by Context.Consumer)
in Box (created by Flex)
in Flex (created by PostCategories)
in PostCategories (created by PrimaryPostPreview)
in div (created by Context.Consumer)
in Box (created by PostContent)
in PostContent (created by PrimaryPostPreview)
in article (created by Context.Consumer)
in Box (created by PrimaryPostArticle)
in PrimaryPostArticle (created by PrimaryPostPreview)
in a (created by Context.Consumer)
in PseudoBox
in Unknown (created by PrimaryPostPreview)
in PrimaryPostPreview (created by FeaturedPostSection)
in div (created by Context.Consumer)
in Box (created by FeaturedPostSection)
in section (created by Context.Consumer)
in Box (created by Flex)
in Flex (created by FeaturedPostSection)
in FeaturedPostSection
in section (created by Context.Consumer)
in Box
in Unknown
in Unknown (created by InnerLoadable)
in InnerLoadable (created by Context.Consumer)
in Unknown (created by ForwardRef)
in ForwardRef
in main (created by Context.Consumer)
in Box
in ThemeProvider (created by ThemeProvider)
in ThemeProvider
in Unknown (created by App)
in HelmetProvider (created by App)
in App
both of them were from the path warningWithoutStack @ webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:179
PS: my OS is windows 10
Hello, Really love this theme. Beautiful job! However, I'm having some issues with pulling in page data. I started a conversation here on the frontity forum but then thought it might be helpful to reach out to you here. I notice the chakra them is running beautifully using the source url https://test.frontity.org so I am not sure what is wrong in my configuration.
HI,
there are detailed instructions how to get the wordpress menu on the frontity community site with a video:
https://www.youtube.com/watch?v=BMJn0RZ2I9s
I have managed to follow this with the mars theme and get it working. However, your theme is somewhat more complex with navigation.
I can get the data to store in sorce, as items as per that instruction, but I cant seem to get my head around how to impliment it with your code. I did set the theme to use the default nav.js file and that worked, but havent been able to get further than that. the usual error is not being able to read source of undefined.
help would be appreicated, thanks.
Instead of doing the pagination with plain JavaScript logic, like this:
{
(data.isFetching && <Loading />) ||
(isSearch && <SearchResults />) ||
(data.isArchive && <Archive />) ||
(data.isPostType && <Post />) ||
(data.is404 && <Page404 />);
}
We can now use the Switch
component like we are doing in our starter themes: frontity/frontity@ecdab9f
We don't have to use libraries.source.parse
and libraries.source.stringify
for next and previous page anymore, so we can simplify this code: https://github.com/chakra-ui/frontity-chakra-ui-theme/blob/master/packages/frontity-chakra-theme/src/components/archive/pagination.js#L63-L78
const { totalPages } = state.source.get(state.router.link);
const { path, page, query } = libraries.source.parse(state.router.link);
const isThereNextPage = page > 1;
const isTherePreviousPage = page < totalPages;
const nextPageLink = libraries.source.stringify({
path,
page: page + 1,
query,
});
const prevPageLink = libraries.source.stringify({
path,
page: page - 1,
query,
});
And just use the next
and previous
we get from data:
const { totalPages, route, page, next, previous } = state.source.get(
state.router.link
);
Please note that path
has been renamed and is now route
.
Docs: https://docs.frontity.org/api-reference-1/wordpress-source#state
Love the theme but it's not working correctly.
The front page loads fine and posts are pulled but if I try to view a post, I get this dump (+ white page in browser preview):
Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\00d7';" should become "content: '\\00d7';".
You can read more about this here:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences
Error: post type from endpoints "posts,pages,media" with slug "service-worker.js" not found
at Object.eval (webpack-internal:///./node_modules/@frontity/wp-source/src/libraries/handlers/postType.ts:8:21)
at process._tickCallback (internal/process/next_tick.js:68:7)
You have illegal escape sequence in your template literal, most likely
inside content's property value.
Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\00d7';" should become "content: '\\00d7';".
You can read more about this here:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences
Error: post type from endpoints "posts,pages,media" with slug "service-worker.js" not found
at Object.eval (webpack-internal:///./node_modules/@frontity/wp-source/src/libraries/handlers/postType.ts:8:21)
at process._tickCallback (internal/process/next_tick.js:68:7)
You have illegal escape sequence in your template literal, most likely
inside content's property value.
Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\00d7';" should become "content: '\\00d7';".
You can read more about this here:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences
I assume this is the problem but don't know how to fix it:
Error: post type from endpoints "posts,pages,media" with slug "service-worker.js" not found
Simply add decode
from Frontity to categories, authors and tag names, like we did here in the starter themes: frontity/frontity@f44a54c
<Header>
Author: <b>{decode(state.source.author[data.id].name)}</b>
</Header>
Frontity needs to be updated first: #13
Frontity now supports more than just 404 errors. It'd be great to transform the 404 component in a more general error component, like what we did here in our starter themes: frontity/frontity@145210c
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.