Hi @moh.meh41 ,
Welcome to the Community!
Can you please provide a repo or code-sandbox with your code ? This is especially helpful to find solutions to technical issues with specific code
Detailing the info suggested here when having issues will help the community to provide the best possible help as quickly and as efficiently as possible.
I am almost sure that problem is with newest @frontity /core@1.14.1. I cloned repo from frontity tutorial GitHub - frontity-demos/tutorial-hello-frontity . Then I installed fresh frontity locally and when ran there was exact same error. The problem was also with my own project, and mars theme.
Uncaught TypeError: fixRegExpWellKnownSymbolLogic is not a function <anonymous> es.string.match.js:10 js hello-frontity.module.js:3481 __webpack_require__ hello-frontity.module.js:790 fn hello-frontity.module.js:101 <anonymous> engine-v8-version.js:1 js hello-frontity.module.js:2279 __webpack_require__ hello-frontity.module.js:790 fn hello-frontity.module.js:101 <anonymous> native-symbol.js:2 js hello-frontity.module.js:2644 __webpack_require__ hello-frontity.module.js:790 fn hello-frontity.module.js:101 <anonymous> well-known-symbol.js:5 js hello-frontity.module.js:3269 __webpack_require__ hello-frontity.module.js:790 fn hello-frontity.module.js:101 <anonymous> is-regexp.js:3 js hello-frontity.module.js:2566 __webpack_require__ hello-frontity.module.js:790 fn hello-frontity.module.js:101 <anonymous> es.string.split.js:3 js hello-frontity.module.js:3517 __webpack_require__ hello-frontity.module.js:790 fn hello-frontity.module.js:101 <anonymous> redefine.js:1 js hello-frontity.module.js:2889 __webpack_require__ hello-frontity.module.js:790 fn hello-frontity.module.js:101 <anonymous> es.regexp.to-string.js:2 js hello-frontity.module.js:3433 __webpack_require__ hello-frontity.module.js:790 fn hello-frontity.module.js:101 <anonymous> to-primitive.js:1 js hello-frontity.module.js:3191 __webpack_require__ hello-frontity.module.js:790 fn hello-frontity.module.js:101 <anonymous> object-define-property.js:4 js hello-frontity.module.js:2734 __webpack_require__ hello-frontity.module.js:790 fn hello-frontity.module.js:101 <anonymous> es.regexp.constructor.js:5 js hello-frontity.module.js:3398 __webpack_require__ hello-frontity.module.js:790 fn hello-frontity.module.js:101 <anonymous> fix-regexp-well-known-symbol-logic.js:2 js hello-frontity.module.js:2324 __webpack_require__ hello-frontity.module.js:790 fn hello-frontity.module.js:101 <anonymous> es.string.replace.js:2 js hello-frontity.module.js:3493 __webpack_require__ hello-frontity.module.js:790 fn hello-frontity.module.js:101 <anonymous> client.js:1 <anonymous> client.js:12 js hello-frontity.module.js:4410 __webpack_require__ hello-frontity.module.js:790 fn hello-frontity.module.js:101 0 hello-frontity.module.js:4562 __webpack_require__ hello-frontity.module.js:790 <anonymous> hello-frontity.module.js:857 <anonymous> hello-frontity.module.js:860 es.string.match.js:10:30
After downgrading to @frontity /core1.14.0 error dissapearedā¦
HI @gajorro and @moh.meh41 ,
I have created a new project with npx frontity create
and I donāt get that error
Iāve also updated GitHub - frontity-demos/tutorial-hello-frontity: Final version of the project explained at tutorial,frontity.org with the latest version of the packages and it works fine
You can see how the latest versions of the frontity packages is working fine in the following projects:
To update ALL the version of the frontity packages to their latest versions I recommend you to follow the following guide
If you can provide a repo or code-sandbox with your code it will be easier for the community to help you any technical issues in your specific code
I am sorry I didnāt say Hiā¦ I started playing with Frontity some time ago and i loved it. I am planning to use it on my company new website.
Thank you @juanma for your test, but I still got same error when run npx frontity create
in clean directory with frontity/core1.14.1 and mars-theme
Maybe itās Os or Node or core-js version related? Or maybe i am doing something wrong
This error cost me a lot of frustration past weekend so i keep digging
Here are outputs from my cli npx frontity info
, for this config with clean mars-theme I got fixRegExpWellKnownSymbolLogic
error :
## System:
- OS: Windows 10 10.0.19041
- CPU: (8) ia32 Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
- Memory: 1.49 GB / 15.96 GB
## Binaries:
- Node: 16.2.0 - C:\Program Files (x86)\nodejs\node.EXE
- npm: 7.6.3 - ~\AppData\Roaming\npm\npm.CMD
## Browsers:
- Chrome: 90.0.4430.212
- Edge: Spartan (44.19041.964.0), Chromium (91.0.864.37)
- Internet Explorer: 11.0.19041.1
## npmPackages:
- @frontity/core: ^1.14.1 => 1.14.1
- @frontity/html2react: ^1.7.0 => 1.7.0
- @frontity/mars-theme: ./packages/mars-theme => 1.5.2
- @frontity/tiny-router: ^1.4.2 => 1.4.2
- @frontity/wp-source: ^1.11.5 => 1.11.5
- frontity: ^1.16.0 => 1.16.0
## npmGlobalPackages:
- frontity: Not Found
- npx: Not Found
and when I downgraded to:
@frontity/core: ^1.14.0 => 1.14.0
Error magically dissapearedā¦ Maybe someone could also reproduce this error on Windows?
1 Like
@David I havenāt been able to reproduce this issue (maybe itās a Windows issue as Iām reproducing it in. Mac) but it seems to be happening to some users
Can you please have a look at it to check if thereās a bug to be fixed here?
1 Like
I am facing this problem in windows and really shocked why I am getting this error,
cloned the frontity/packages/twentytwenty-theme at dev Ā· frontity/frontity Ā· GitHub but again getting the same error.
can you please tell me how to downgrade the @frontity /core
hi, @juanma and thanks a lot
here is the project repo:
GitHub - mehmoh41/frontity
and the errors I get in my console errors:
es.string.match.js?466d:10 Uncaught TypeError: fixRegExpWellKnownSymbolLogic is not a function
at eval (es.string.match.js?466d:10)
at Objectā¦/node_modules/core-js/modules/es.string.match.js (new-project.module.js:3643)
at webpack_require (new-project.module.js:833)
at fn (new-project.module.js:130)
at eval (engine-v8-version.js:1)
at Objectā¦/node_modules/core-js/internals/engine-v8-version.js (new-project.module.js:2441)
at webpack_require (new-project.module.js:833)
at fn (new-project.module.js:130)
at eval (native-symbol.js?4930:2)
at Objectā¦/node_modules/core-js/internals/native-symbol.js (new-project.module.js:2806)
For 1.14.0 version of frontity/core I am doing this with:
npm install @frontity/core@1.14.0
inside the directory with project (I donāt have frontity installed globally). Forgive me if itās kind of ābrutalā solution, but for me itās working
1 Like
thanks,
downgrading worked for me
thanks @gajorro
I think there is a problem with core version 1.14.1
1 Like
David
1 June 2021 15:10
15
Sure, Iām taking a look. Thanks @moh.meh41 and @gajorro for reporting the issue.
1 Like
David
1 June 2021 15:36
16
I was able to reproduce the error. Iām taking a deeper look.
David
1 June 2021 22:08
17
I think the problem is in this line:
/**
* The configurations of Babel, generated in a previous step.
*/
babel: BabelConfigs;
}
/**
* The regular expressions used to exclude packages from transpilation.
*/
export const exclude = [
/\/core-js($|\/)/,
/\/webpack($|\/)/,
/\/regenerator-runtime($|\/)/,
];
/**
* Generate the object for Webpack's entry configuration.
*
* Official Webpack docs: https://webpack.js.org/configuration/entry-context/.
*
* @param options - Defined in {@link EntryOptions}.
We could be transpiling packages that include core-js
in their names, and shouldnāt be transpiled.
Replacing that line back to
/\bcore-js\b/,
and building the @frontity/core
package, it works again.
1 Like
@David Is this a bug that should be fixed in the fronitty
package? Shall an issue (or Pull Request) be opened in the Ā» Frontity Ā· GitHub repositoty?
David
2 June 2021 09:49
19
Yup, itās something we should fix in the @frontity/core
package.
What I donāt fully understand is why it fails only on Windowsā¦
It seems like my fault. I changed from \b
to /
, and Windows paths use \
. I assumed that paths were converted by Webpack.
Iāve made a quick fix in this branch. @david can you test this on Windows?
export const exclude = [
/(\/|\\)core-js($|(\/|\\))/,
/(\/|\\)webpack($|(\/|\\))/,
/(\/|\\)regenerator-runtime($|(\/|\\))/,
];
1 Like
I have made a PR with that branch, including also a fix for the regular expression used to exclude ts-node
files.
frontity:dev
ā frontity:fix-excluded-transpilation-in-windows
opened 01:42PM - 02 Jun 21 UTC
<!--
Thanks for your pull request š. Note that not following the template mightā¦
result in your issue being closed.
-->
<!--
Please make sure you're familiar with and follow the instructions in the
contributing guidelines found here:
https://docs.frontity.org/contributing/code-contribution-guide
-->
<!--
If you're new to contributing to open source projects, you might find this free
video course helpful: http://kcd.im/pull-request
-->
<!--
Please fill out the information below to expedite the review and (hopefully)
merge of your pull request!
-->
**What**:
Change module and ts-node exclude regexps to work with backslashes as well.
**Why**:
Because we need to take into account that paths in Windows contain backslashes: `folder\file.js`.
**How**:
Simply by changing the regular expression to take into account that case. From `\/` to `(\/|\\)`.
**Tasks**:
- [x] Code
- [x] Unit tests
- [x] Add a changeset (with link to its [Feature Discussion](https://community.frontity.org/c/33) if it exists)
<!-- Changesets are necessary if your changes should release any packages.
Run `npx changeset` to create a changeset.
More info at https://docs.frontity.org/contributing/code-contribution-guide#what-is-a-changeset -->
**Unrelated Tasks**
- [ ] TSDocs
- [ ] TypeScript
- [ ] End to end tests
- [ ] TypeScript tests
- [ ] Update starter themes
- [ ] Update other packages
- [ ] Update community discussions
**Additional Comments**
<!-- Feel free to add any additional comments. -->
@santosguillamot , I took the liberty to mark this as critical because it is preventing people from developing with the latest version of Frontity on Windows
1 Like
David
2 June 2021 15:11
22
Tested, works like a charm.
2 Likes
Gracias, con 1.14.0 funciona!
1 Like
The latest release fix this issue
Features
As part of the AMP feature , we have made the Image component from @frontity/components AMP-aware and remove the Intersection Observer fallback which used to lazily load images in the absence of native lazy loading. #826
Fixes
Fix Webpack/TS-Node excludes not working on Windows. #840
Fix transpilation of frontity.config.js files in external packages. #837
Refactor createSymlinks to use a custom implementation of fs-extra's readFile function. #843
Credits
Huge thanks to @michā¦
2 Likes