[英]npm install --save fs - package not being found once installed
When I try to run a build for my SSR Nuxt app, via yarn run dev
I get the following Error message:当我尝试通过yarn run dev
为我的 SSR Nuxt 应用程序运行构建时,我收到以下错误消息:
This dependency was not found:
* fs in ./node_modules/json5/lib/register.js
To install it, you can run: npm install --save fs
Once I execute npm install --save fs
or yarn add fs
I still get the error一旦我执行npm install --save fs
或yarn add fs
我仍然得到错误
How do I get the code to build?如何获取要构建的代码?
Adding the following to the Nuxt.config.js allows the build to pass:将以下内容添加到 Nuxt.config.js 允许构建通过:
extend (config, {isDev, isClient}) {
config.node = {
fs: 'empty'
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.