Closed andreiho closed 5 years ago
Thanks for the report
We created a feature branch vor v3.
npm install --save storyblok/storyblok-js-client#feature/corejs-3
I have the same problem when using the storyblok-js-client
in an Angular
(version 8) project.
The error looks like this:
ERROR in ./node_modules/storyblok-js-client/dist/throttlePromise.js Module not found: Error: Can't resolve 'core-js/modules/es6.function.name' in '/Users/machetanz/DEV/design-system/node_modules/storyblok-js-client/dist'
Currently I installed the version 2.5.4
of core-js
to fix this error. Is there a better approach than installing an older/deprecated version of core-js
to fix this error?
Thanks in advance. :)
@LukasMachetanz Update storyblok-js-client
to 1.0.28, this version depends on core-js@3.
@andreiho The error occurred with this version. I assume that should not be the case if you are suggesting this as a solution?
@LukasMachetanz If you depend on storyblok-js-client@1.0.28 and core-js@3 you shouldn't have any problems. At least I don't anymore.
See throttlePromise.js. The correct path is required, so if you're still getting Error: Can't resolve 'core-js/modules/es6.function.name'
you have an older version installed.
I tried it in a new project; it is working now. Thank you for your help and the quick answer. Sorry that I had to bother you again.
SOLVED & CLOSED ;)
On brand new create-react-app installs, the latest version of storyblok-js-client still gives this error, and the error found at https://github.com/storyblok/storyblok-js-client/issues/23
I'm able to resolve it by using the storyblok/storyblok-js-client#feature/corejs-3 feature branch, but that doesn't seem to have Storyblok.richTextResolver in it...
Is there any way to update the main current version so that it installs correctly with create-react-app on a fresh install?
To follow up on my comment, I just noticed that when I run an npm install of storyblok-js-client without specifying which version, it installs an older version. I manually specified the latest version, and things seem to work.
It looks like the latest tag is wrong in npm: https://www.npmjs.com/package/storyblok-js-client
in my project deps i have :
"core-js": "^3.3.2", "storyblok-js-client": "storyblok/storyblok-js-client#feature/corejs-3",
and in dev-deps :
"storyblok-migrate": "^0.3.3",
when i run
npx storyblok-backup --components --stories
i get the same error: ` Cannot find module 'core-js/modules/es6.function.name' Require stack:
is this a related issue?
I have removed node_modules and rebuilt the project several times but im still getting this error.
in the node_modules/storyblok-js-client/package.json the version is :
"name": "storyblok-js-client", "version": "1.0.28",
@jajouka79 Try using storyblok-js-client 2.
thanks andre, i have tried with this as well :
"storyblok-js-client": "2.0.10",
but i am getting the same error
After upgrading
core-js
to version 3, I get this error:Upgrading the babel plugin to v3 should do the trick. See here.