Akirami / vue-markdown-v2

A Powerful and Highspeed Markdown Parser for Vue
https://miaolz123.github.io/vue-markdown/
MIT License
6 stars 6 forks source link

Can't resolve 'markdown-it/lib/token' #1

Open frankxiao1102 opened 5 years ago

frankxiao1102 commented 5 years ago

ERROR in ./node_modules/markdown-it-toc-and-anchor/dist/index.js Module not found: Error: Can't resolve 'markdown-it/lib/token' in '/Users/xiaochaohong/Desktop/Project/SensorLive/github/sensor.live-admin/web/node_modules/markdown-it-toc-and-anchor/dist' @ ./node_modules/markdown-it-toc-and-anchor/dist/index.js 12:36-68 @ ./node_modules/vue-markdown-v2/dist/vue-markdown.common.js @ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/pages/Admin/AdminIndex.vue @ ./src/pages/Admin/AdminIndex.vue @ ./src/pages/Admin/routes.js @ ./src/router.js @ ./src/app.js @ multi (webpack)-dev-server/client?https://dev-admin.sensor.live:8080 webpack/hot/dev-server ./src/app.js

螢幕快照 2019-04-10 下午1 19 31

Here is my package.json

"dependencies": {
    "@mdi/font": "^3.5.95",
    "@octokit/rest": "^16.23.2",
    "axios": "^0.17.1",
    "babel-runtime": "^6.26.0",
    "flag-icon-css": "^3.2.0",
    "mavon-editor": "^2.6.17",
    "moment-timezone": "^0.5.21",
    "vue": "^2.5.17",
    "vue-i18n": "^7.8.1",
    "vue-lottie": "^0.2.1",
    "vue-markdown-v2": "0.0.2",
    "vue-moment": "^3.1.0",
    "vue-router": "^3.0.1",
    "vuejs2-breadcrumbs": "^1.0.7",
    "vuetify": "^1.2.6",
    "vuex": "^3.0.1"
},
"devDependencies": {
    "babel-core": "^6.26.3",
    "babel-eslint": "^8.2.6",
    "babel-loader": "^7.1.5",
    "babel-plugin-transform-runtime": "^6.23.0",
    "babel-preset-env": "^1.6.0",
    "babel-preset-stage-3": "^6.24.1",
    "chunk-manifest-webpack-plugin": "^1.1.2",
    "cross-env": "^5.2.0",
    "css-loader": "^0.28.7",
    "eslint": "^5.6.1",
    "eslint-config-standard": "^12.0.0",
    "eslint-loader": "^2.1.1",
    "eslint-plugin-import": "^2.14.0",
    "eslint-plugin-node": "^7.0.1",
    "eslint-plugin-promise": "^3.8.0",
    "eslint-plugin-standard": "^3.1.0",
    "eslint-plugin-vue": "^5.0.0-beta.3",
    "file-loader": "^1.1.6",
    "node-sass": "^4.9.3",
    "sass-loader": "^6.0.6",
    "style-loader": "^0.13.1",
    "stylus": "^0.54.5",
    "stylus-loader": "^3.0.1",
    "uglifyjs-webpack-plugin": "^1.3.0",
    "vue-loader": "^13.7.3",
    "vue-style-loader": "^4.1.2",
    "vue-template-compiler": "^2.5.17",
    "webpack": "^3.6.0",
    "webpack-dev-server": "^2.11.3",
    "webpack-manifest-plugin": "^1.3.2"
}
Akirami commented 5 years ago

@frankxiao1102

This module work with babel v7, for version 6 the original module from miaolz123 work fine.

Mindexperiment commented 5 years ago

Same issue here with a fresh new laravel installation

Akirami commented 5 years ago

@Mindexperiment @frankxiao1102

Which version of markdown-it is installed in your node_modules? (latest is 8.4.2)

Is the file "markdown-it/lib/token present"?

Akirami commented 5 years ago

@Mindexperiment

Do you use Babel 7 and Webpack 4?

Mindexperiment commented 5 years ago

Laravel mix 4.0.16 -> Webpack 4.35.0 Laravel mix 4.0.16 -> @Babel/core@7.4.5

https://github.com/JeffreyWay/laravel-mix/blob/master/package.json

Akirami commented 5 years ago

@Mindexperiment

And for my other question please?

Mindexperiment commented 5 years ago

Ok, wait, by installing vue-markdown-v2@0.1.7 I see there's a dependency to markdown-it@8.4.2 and other markdown-it-abbr/container/deflist so on..

markdown-it/lib/token is not present here is the error I get:

errore

frankxiao1102 commented 5 years ago

@frankxiao1102

This module work with babel v7, for version 6 the original module from miaolz123 work fine.

It doesn't matter, I have used another package instead of vue-markdown-v2. Thank you.

Akirami commented 5 years ago

@Mindexperiment

Tell me if all is fine please?

Mindexperiment commented 5 years ago

the full list of dependency list

Akirami commented 5 years ago

What if uninstall vue-markdown-v2 and totally unistall markdown-it and its plugin, then reinstall all of that ?

Mindexperiment commented 5 years ago

I'm not on the project right now, this evening I try to refresh everything and report back, thank you

th0rgall commented 4 years ago

Just noting here that I encountered the same error after installing vue-markdown-v2 and removing vue-markdown, in that order.

Reinstalling vue-markdown-v2 as suggested above solved the problem.

tashima42 commented 3 years ago

Just noting here that I encountered the same error after installing vue-markdown-v2 and removing vue-markdown, in that order.

Reinstalling vue-markdown-v2 as suggested above solved the problem.

I made the same thing and it worked.

  1. Remove vue-markdown-v2
  2. Remove vue-markdown
  3. Delete node_modules
  4. Install vue-markdown-v2