informed: Module not found: Can't resolve '@babel/runtime/core-js/json/stringify'
I’m a newbie. I’ve installed informed as per the docs, but am getting the following error when I try to yarn start.
Failed to compile.
./node_modules/informed/dist/index.js
Module not found: Can't resolve '@babel/runtime/core-js/json/stringify' in '/home/chris/code/elixir/blog/blog/node_modules/informed/dist'
What am I doing wrong?
PS I have done npm install --save babel-runtime in my project, although I don’t see why this is necessary.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (2 by maintainers)
Looks like in
@babel/runtime@7.0.0-beta.56they split the runtime into 2 packages. This package is built with a pre-56 version but will allow a post-55 version to be installed.Adding the following to your package.json should fix this
v7.0.0-beta.56
Adding
"@babel/runtime": "<=7.0.0-beta.55",to you devDependencies in package.json did work as per @samlecuyer . Remember to run ‘npm i’ thereafter.I ran into this issue just now too but did manage to get it working.
You will need to ensure you have the right versions of both
@babel/runtimeand@babel/plugin-transform-runtime… that is if you are using a later version of babel, all versions need to match all other babel versions (at least that’s what’s been my issue. Then add the following to your.babelrcjs:But yeah, not sure why the
npmversion needs this, I’d prefer the npm distribution to be independently deployable without needing babel installs. There may be a good reason for this that I just don’t know about - total newbie to this repo.