首页 > 解决方案 > 使用 npm 审计修复后未找到 package.json

问题描述

我正在尝试安装 sass,但我不明白为什么我一直遇到如下所示的问题错误的屏幕截图如第一张图片所示

我知道我应该按照说明运行npm audit fix,但是当我运行命令时,我得到一个错误no package.json found,是的,这是因为根本没有安装 sass,因此没有节点模块和 json 文件,我该怎么做解决这个问题?

标签: jsonnpmsassnode-modulesnode-sass

解决方案


Try running the npm init command at the root of your project to generate the package.json file and re run the command to install sass.


推荐阅读