![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
node
肖恩啊
这个作者很懒,什么都没留下…
展开
-
2021-08-19
npm 安装包报错:sha512-cAUjMgnS0cG6RQDp+hXRJB0vD74XhCRGY4j/F62F59bWnHCclW3JC5lPXXtO3JIYeYpRJhnN5yl/AJL5mtsKgw== integrity checksum failed when using sha512: wanted sha512-cAUjMgnS0cG6RQDp+hXRJB0vD74XhCRGY4j/F62F59bWnHCclW3JC5lPXXtO3JIYeYpRJhnN5yl/AJL5mtsKgw== b原创 2021-08-19 15:31:37 · 167 阅读 · 0 评论 -
node 转发文件上传,处理文件数据后丢失文件信息
第一种try { const svgoResult:any = await svgoUp(nbuf.toString()); if (svgoResult && svgoResult.data) { const formData = new FormData(); // 1.先将字符串转换成Buffer const fileContent = Buffer.from(svgoResult.data); // 2.补上文件原创 2020-08-28 21:17:05 · 334 阅读 · 0 评论 -
node 提供文件下载接口,前端项目调用
node 项目// 依赖string-to-file-stream 包,字符串生成文件流const string2fileStream = require('string-to-file-stream'); /** * Post 请求 下载图标 * * */ @Post('/api/downloadSvg') async downloadSvg(req, res) { const id = req.body.id; try原创 2020-08-28 21:07:54 · 1659 阅读 · 0 评论 -
webpack node 路径分隔符windows mac 兼容问题
情境:项目在mac 端启动没问题,但是在windows 端不能正常运行。问题:经排查是路径拼接未兼容windows系统比如,你想通过自定义拼接的方式生成一个路径:let rootPath = process.cwd();const watchPath = `${rootPath}/src/views/**/(${filesType})`;console.log(watchPath)在...原创 2019-10-29 15:52:49 · 3198 阅读 · 0 评论