[英]How to fix Module Not Found Error in node.js?
So I was importing fs
module in node.js const fs = require('fs');
所以我在 node.js 中导入了fs
模块const fs = require('fs');
and MODULE_NOT_FOUND
error is coming up... I have googled a lot found no help.并且MODULE_NOT_FOUND
错误出现了......我用谷歌搜索了很多没有找到帮助。
Check if you are in the right directory where the '.js' file is.检查您是否位于“.js”文件所在的正确目录中。
MODULE_NOT_FOUND
, just error name tells you about missing module in your project. MODULE_NOT_FOUND
,只是错误名称告诉您项目中缺少模块。 Installing modules can be done by npm i <name module>
so in your consoile type npm i fs
安装模块可以通过npm i <name module>
完成,所以在你的 consoile 类型npm i fs
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.