$ 余烬服务node_modules显示为空,您可能需要运行"npm install"


$ ember serve
node_modules appears empty, you may need to run `npm install`

尝试更改节点,余烬和科尔多瓦版本

$ npm install -g node-modules
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated hawk@1.0.0: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated sntp@0.2.4: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated cryptiles@0.2.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated hoek@0.9.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated boom@0.4.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated object-keys@0.2.0: Please update to the latest object-keys
C:Usersvinod rajAppDataRoamingnpmnode-modules -> C:Usersvinod rajAppDataRoamingnpmnode_modulesnode-modulesapp.js
C:Usersvinod rajAppDataRoamingnpm
`-- node-modules@1.0.1

Ember CLInode_modules appears empty, you may need to run npm install抛出的错误消息表明您尚未安装项目的依赖项。您应该通过运行npm install(如果使用备用包管理器,则运行yarn install(来执行此操作。

你运行npm install -g node-modules.这将全局安装一个名为node-modules的包。这不是你想要的。您希望按照package.json中的指定在本地安装项目依赖项,并且可能锁定到package-lock.json中的特定版本(如果使用 yarn,则锁定yarn.lock(。

正如@jelhan建议的那样,您需要通过npmyarn安装依赖项。如果您已完成@jelhan建议的操作,但仍然收到错误,请尝试删除node_modulesdisttemp文件夹并安装依赖项。

cd /path/to/project
rm -rf node_modules dist tmp
npm install

最新更新