node.js - 为什么 nuxt 要求 @nuxt/typescript-build
问题描述
如何修复此错误?
WARN Module @nuxt/typescript-build not found. Please ensure @nuxt/typescript-build
is in devDependencies and installed. HINT: During build step, for npm/yarn,
NODE_ENV=production or --production should NOT be used.
环境是 AWS lambda,节点 14。 Nuxt 安装有 typescript,从 npm 生成。
解决方案
不确定这个在做什么,但这是安装过程中所需的软件包之一。如此处所示:https ://typescript.nuxtjs.org/guide/setup#installation
yarn add --dev @nuxt/typescript-build @nuxt/types
将此添加到您的nuxt.config.js
文件中
export default {
buildModules: ['@nuxt/typescript-build']
}
创建一个tsconfig.json
文件,你应该很好!
推荐阅读
- c - strcat 不会在同一行加入字符串(在 c 中)
- flutter - Flutter,阴影裁剪系统如何工作?
- python - 如何在 python 上的 vim 中导入一个类?
- reactjs - TypeError: Object(...) 不是函数(匿名函数)
- vba - 创建一个循环来迭代所有成功/失败事件的组合
- selenium-webdriver - 有没有办法通过 webdriver 验收测试来做“如果我看到,那么……”?
- android - 如果我向 10% 的用户推出更新,并再次更新应用程序,它会再次选择相同的 10% 用户吗?
- c++ - 编译旧 C++ 库
- magento - 如何在magento 2中的UiComponent中获取目录产品
- asp.net-core-mvc - 如何在剃须刀中从模型中设置输入类型=“文件”