包的引入-自定义包--把md文件转成HTML页面

在Node环境中,通过npm安装markdown-it包时遇到404错误。解决方法是安装淘宝镜像,之后成功安装并能使用markdown-it。创建package.json文件,并在main.js中测试转换MD文件为HTML,内容包括读取hello.md文件,生成的HTML展示在hello.html中。
摘要由CSDN通过智能技术生成

前提条件:
已经安装好node环境,新建一个项目,再引入包 markdown-it;这时候出现了错误:

npm ERR! Windows_NT 10.0.17134
npm ERR! argv "C:\\dev\\nodejs\\node.exe" "C:\\dev\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "markdownn-it" "--save"
npm ERR! node v6.10.3
npm ERR! npm  v3.10.10
npm ERR! code E404

npm ERR! 404 Not found : markdownn-it
npm ERR! 404
npm ERR! 404  'markdownn-it' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! Please include the following file with any support request:
npm ERR!     F:\others\XAMPP\htdocs\es6\node\hello\npm-debug.log

F:\others\XAMPP\htdocs\es6\node\hello>npm install markdownn-it --save
npm ERR! Windows_NT 10.0.17134
npm ERR! argv "C:\\dev\\nodejs\\node.exe" &#
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值