vue-markdown: Cannot find module 'babel-runtime/core-js/get-iterator' in Electron build
I use your library with electron-vue. When I run DEV mod - all is well. But after building production version I get an error
Uncaught Error: Cannot find module 'babel-runtime/core-js/get-iterator'
at Module._resolveFilename (module.js:470:15)
at Function.Module._resolveFilename (/home/alex/LinWin/Develop/command-editor/dist/linux-unpacked/resources/electron.asar/common/reset-search-paths.js:35:12)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at webpackUniversalModuleDefinition (/home/alex/LinWin/Develop/command-editor/dist/linux-unpacked/resources/app.asar/node_modules/vue-markdown/dist/vue-markdown.common.js:9:28)
at /home/alex/LinWin/Develop/command-editor/dist/linux-unpacked/resources/app.asar/node_modules/vue-markdown/dist/vue-markdown.common.js:16:3
at Object.<anonymous> (/home/alex/LinWin/Develop/command-editor/dist/linux-unpacked/resources/app.asar/node_modules/vue-markdown/dist/vue-markdown.common.js:400:2)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
Import in component:
import VueMarkdown from 'vue-markdown'
export default {
name: 'about',
components: { VueMarkdown },
// ...
}
About this issue
- Original URL
- State: open
- Created 7 years ago
- Reactions: 30
- Comments: 31 (1 by maintainers)
Commits related to this issue
- Add babel-runtime for vue-markdown See more on their issue at https://github.com/miaolz123/vue-markdown/issues/18 — committed to kinow/cylc-ui by kinow 4 years ago
- Add babel-runtime for vue-markdown See more on their issue at https://github.com/miaolz123/vue-markdown/issues/18 — committed to kinow/cylc-ui by kinow 4 years ago
- Add babel-runtime for vue-markdown See more on their issue at https://github.com/miaolz123/vue-markdown/issues/18 — committed to kinow/cylc-ui by kinow 4 years ago
I just ran into this. I did
npm install --save babel-runtime
and the error went away, though now I’m having other difficulties.EDIT: Just to clarify, I’m not using Electron; I’m just doing a plain old
watchify
build.Delete node_modules folder, re npm install~~
Did you install Babel runtime:
npm i babel-runtime --save
Getting this issue with vue-cli.
This is an issue for me using Nuxt 2.0.
Hi, had this issue today on a fresh install. Here is what I ran:
It then compiled and worked.
Same as @leopoldkristjansson , can be bypassed until real solution by adding those dependencies to the package or going to the
node_modules/vue-markdown
and running install thereAs mentioned above, simply installing
babel-runtime
may screw some things up because that is babel@6. If you are using a build tool like webpack with babel@7 simply usein your start-up file, or
in the single-file component.
If you happen to use this import a lot and don’t want to install the plugin globally, you can also add an alias to the webpack config.
I am using yarn, this worked for me
Same here with Nuxt 2.0.0:
These dependencies were not found: friendly-errors 11:29:00 friendly-errors 11:29:00
Imported as follow in a plugin.
while. no work
I’m getting this same error when trying to build my Electron app. Everything works fine in dev, but it throws the error listed in production.
Any help on this?
Same here in a Nuxt 2.13+ project.
npm i babel-runtime
fix itit’s works for me too. my env is nuxt ^2.0.0.
Babel 7 has switched to scoped packages, so the rumtime is avaialble under “@babel/rumtime”, instead of ‘babel-runtime’ as in Babel v6. I think the developer would need to update the dependency. https://babeljs.io/docs/en/next/v7-migration#scoped-packages
In the mean time, explicitly installing babel v6 fixes it for me.
Same here in a Laravel Mix / Vue project.
Interesting. I’m not using Electron, I’m using babel with browserify. I ran into this error. Running
npm install
within the module subdirectory was enough to make to fix the problem for me.