随笔分类 -  Nodejs

Application entry file "electron\background.js" does not exist
摘要:背景 用 Vue3 + Electron 开发了个 PDF 自由合并客户端。 客户端侧代码慢慢膨胀,于是想将默认的路径src/background.js调整到 electron/background.js。 于是修改了: vue.config.js pluginOptions: { electron 阅读全文
posted @ 2022-12-07 00:11 死宅程序员 阅读(1134) 评论(0) 推荐(0)
original: Error: Unknown storage engine 'InnoDB'
摘要:问题 Nodejs 工程下,用 sequelize 向一个现有的 MySQL 数据库中初始化数据时报错,如题: original: Error: Unknown storage engine 'InnoDB' ENV MySQL 5.6 Sequelize: ^6.25.5 排查 查看 mysql 阅读全文
posted @ 2022-11-21 00:07 死宅程序员 阅读(138) 评论(0) 推荐(0)
MongooseError: Operation `logs.insertOne()` buffering timed out after 10000ms
摘要:我有个model总报错: 2022-10-17 00:22:15: log add: MongooseError: Operation `logs.insertOne()` buffering timed out after 10000ms 0|tinyurl | at Timeout.<anony 阅读全文
posted @ 2022-10-17 00:32 死宅程序员 阅读(554) 评论(0) 推荐(0)
Node: 全局安装的依赖包,引用时却找不到
摘要:Env CentOS 7.x Nodejs 8.x 操作 通过npm config list 查看配置,没有自定义设置 npm config get prefix 看到了路径指向:/root/node_modules 不过这个路径根本没有 node_modules 文件夹 通过重新安装全局依赖包,并 阅读全文
posted @ 2022-01-18 11:06 死宅程序员 阅读(1347) 评论(0) 推荐(0)
TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function
摘要:TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function at promisify (internal/util.js:214:11) at Object.<anonymous> (/root 阅读全文
posted @ 2022-01-18 10:28 死宅程序员 阅读(3345) 评论(3) 推荐(1)
安装 nodejs :指定的账户已存在
摘要:昨天祸从天降,npm 突然没了,不过 node 还在。查了一下,node 安装目录下 确实少了npm,原因未知。 那就再安装一次 node 吧,顺便把版本升到 12.x 最新:node-v12.22.7-x64.msi 从官网用迅雷顺利下载后,发现安装不了,从昨天到今天,反复尝试多次,都是在安装过程 阅读全文
posted @ 2021-12-01 15:58 死宅程序员 阅读(324) 评论(0) 推荐(0)
npm: Cannot read property 'pickAlgorithm' of null
摘要:错误 安装某 package 时,提示报错: npm ERR! Invalid response body while trying to fetch https://registry.npmjs.org/inherits: Cannot read property 'pickAlgorithm' 阅读全文
posted @ 2021-06-17 11:41 死宅程序员 阅读(21793) 评论(0) 推荐(1)
npm 创建一个 github action
摘要:1、创建 access_token :https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token 2、创建 action 目录 .github/workflows/npm-pu 阅读全文
posted @ 2021-04-29 22:02 死宅程序员 阅读(132) 评论(0) 推荐(0)
CMD 显示二维码乱码
摘要:执行命令: chcp 65001 并设置字体为: Lucida Console 即可修复。 阅读全文
posted @ 2020-12-30 13:05 死宅程序员 阅读(1191) 评论(0) 推荐(0)
Node.js: Uncaught ReferenceError: URLSearchParams is not defined
摘要:在低版本 Node 中(如 v8.5.x) 全局没有URLSearchParams类。 此 API 新增于: v10.0.0 可通过如下方式调用: const URLSearchParams = require('url').URLSearchParams; const sp = new URLSe 阅读全文
posted @ 2020-11-17 18:33 死宅程序员 阅读(2959) 评论(0) 推荐(0)
npm ERR: Could not install from "Files\npm-cache"
摘要:# 报错了 ``` E:\Code\test>npx create-react-app my-react-appnpm ERR! code ENOLOCALnpm ERR! Could not install from "Files\npm-cache\_npx\7920" as it does n 阅读全文
posted @ 2020-06-17 18:14 死宅程序员 阅读(4197) 评论(0) 推荐(1)
修改 npm 全局安装目录
摘要:我的电脑系统盘只有 64 G,空间比较紧张,需要节约系统盘的空间占用。 所以 npm 全局 module 不易安装到默认路径下。 如何设置呢? - 编辑 npm 配置 npm config edit - 添加、修改 prefix 的值,指向新的路径,如: prefix=E:\Program File 阅读全文
posted @ 2020-01-23 22:42 死宅程序员 阅读(1663) 评论(0) 推荐(0)
Vue.js TypeError: Cannot set property 'render' of undefined
摘要:# 遭遇报错:Vue.js TypeError: Cannot set property 'render' of undefined # 工程背景- webpack + ts-loader + vue # 搜索得到的建议:- 保证声明的组件(.vue)有写`export default`导出模块 # 阅读全文
posted @ 2019-10-31 15:30 死宅程序员 阅读(3432) 评论(0) 推荐(0)