Open cawa-93 opened 7 years ago
Delete node_modules folder, re npm install~~
@miaolz123 I am still getting this error after re-installing everything. I then did a npm install
in node_modules/vue-markdown
because there was no node_modules
there and then got a new error:
{ [Error: ./~/vue-markdown/~/markdown-it-emoji/lib/data/full.json
Module parse failed: C:\Users\[REDACTED]\node_modules\vue-markdown\node_modules\markdown-it-emoji\lib\data\full.json Unexpected token (2:7)
You may need an appropriate loader to handle this file type.
| {
| "100": "💯",
| "1234": "🔢",
| "grinning": "😀",
@ ./~/vue-markdown/~/markdown-it-emoji/index.js 4:24-55
Windows 10
$ node -v
v6.10.0
$ npm -v
3.10.10
$ gulp -v
[07:09:41] CLI version 3.9.1
[07:09:41] Local version 3.9.1
$ npm ls webpack
C:\Users\[REDACTED]
+-- laravel-elixir-webpack-official@1.0.10
| +-- webpack@2.1.0-beta.22
| `-- webpack-stream@3.2.0 (git://github.com/jeroennoten/webpack-stream.git#d78a3568e259f9cdbc64c60290639af6ef6d3baf)
| `-- webpack@1.14.0
`-- vue-markdown@2.1.3
`-- webpack@1.14.0 extraneous
@bram1028 did you resolve the issue yet?
No. I had abandoned this. I just tried again and got the same error.
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?
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.
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.
This is an issue for me using Nuxt 2.0.
These dependencies were not found:
- babel-runtime/core-js/get-iterator in ./node_modules/vue-markdown/dist/vue-mar kdown.common.js
- babel-runtime/core-js/object/keys in ./node_modules/vue-markdown/dist/vue-mark down.common.js
To install them, you can run: npm install --save babel-runtime/core-js/get-itera tor babel-runtime/core-js/object/keys
Did you install Babel runtime:
npm i babel-runtime --save
Did you install Babel runtime:
npm i babel-runtime --save
while. no work
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 there
Just ran into this issue. Reinstalling dependencies is getting boring now...
I was still getting these problems also, so I pasted the VueMarkdown.js file from node_modules into a new file. It's only one file with a bunch of imports, so I did:
npm install --save-dev markdown-it markdown-it-emoji markdown-it-sub markdown-it-sup markdown-it-footnote markdown-it-deflist markdown-it-abbr markdown-it-ins markdown-it-mark markdown-it-toc-and-anchor markdown-it-katex markdown-it-task-lists
It worked, as in it rendered unparsed markdown, which was better than those babel runtime errors.
I'm having other issues now related to styling the markdown output. I already abandoned this library because of that but I'm having the same issue with the markdown editor example from the Vue docs, and an article that shows how to make a markdown preview component, AND with vue-tiptap.
There seems to be an issue with v-html
and styling CSS that is way out of the scope of this GitHub issue.
Long story short, I think I fixed the problem described in here with my described steps, but I'm not sure so I'll just leave this comment about it.
Also I recommend caution with just blindly installing babel-runtime
especially if you are using Babel 7. You might be massively inflating your bundle size. I saw mine go up 70kb at one point.
Getting this issue with vue-cli.
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.
import Vue from 'vue'
import VueMarkdown from 'vue-markdown'
Vue.use(VueMarkdown)
Same here in a Laravel Mix / Vue project.
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.
npm install --save babel-runtime
I am using yarn, this worked for me
yarn add babel-runtime --save
it's works for me too. my env is nuxt ^2.0.0.
npm i babel-runtime --save
Also ran into this problem, followed the README instructions in a blank vue-cli project.
I experienced this issue today on our build server, things had been working fine for a few weeks and out of the blue this error started appearing. npm i babel-runtime --save
fixed things but not sure why this wasn't needed originally.
Hi, had this issue today on a fresh install. Here is what I ran:
yarn add babel-runtime --save
It then compiled and worked.
Same here in a Nuxt 2.13+ project.
npm i babel-runtime
fix it
Got similar issue as well and yarn add babel-runtime
does the magic!
I spent quite some time to find the problem, and I just want to put it here so if people search they can find this too:
I deployed a Nuxt app with vue-markdown on Google App Engine and got error randomly in some pages that use vue-markdown:
ERROR render function or template not defined in component: anonymous
at Qi (node_modules/vue-server-renderer/build.prod.js:1:66749)
at io (node_modules/vue-server-renderer/build.prod.js:1:70622)
at ro (node_modules/vue-server-renderer/build.prod.js:1:70272)
at eo (node_modules/vue-server-renderer/build.prod.js:1:67519)
at node_modules/vue-server-renderer/build.prod.js:1:70739
When setting NODE_ENV to "development", it throws similar error of this post.
ERROR Cannot find module 'babel-runtime/core-js/get-iterator'
Note: The error does not shown in local development (nuxt build
and then nuxt start
).
The solution is as stated by many above. babel-runtime
fixes the problem!
use npm i babel-runtime --save
to resolve this error, it worked
macOS 10.14 vue@2.6.11 vue-markdown@2.2.4 node@10.13.0
As 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 use
import Vue from "vue";
import { install as VueMarkdown } from "vue-markdown/src/build";
Vue.use(VueMarkdown);
in your start-up file, or
<template>
...
</template>
<script>
import VueMarkdown from "vue-markdown/src/VueMarkdown";
export default {
...,
components: {
VueMarkdown,
...
},
...
};
</script>
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 had this problem today. I went directly into node_modules/vue-markdown and ran npm install there, and it resolved the issue but with a ton of warnings, including
core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
so I upgraded core-js in that folder, and got the error again.
It looks like get-iterator
is no longer part of core-js or that functionality has been renamed. I'll try the solution mentioned @schl3ck next.
That worked like a charm.
This is still an issue. Recently installed Nuxt.js version 2.14.6, and then installed vue-markdown to render markdown content for a website. Had to run yarn add babel-runtime
to make this issue disappear.
Did you install Babel runtime:
npm i babel-runtime --save
thanks work for me, on Gridsome and Strapi
still an issue.
I use your library with electron-vue. When I run DEV mod - all is well. But after building production version I get an error
Import in component: