Sails.js无法运行脚本:Sails运行rebuild-cloud-sdk

时间:2019-01-25 21:58:01

标签: node.js sails.js

我在运行时遇到问题:sails run rebuild-cloud-sdk

我收到以下错误:Could not regenerate the configuration for the "Cloud SDK" -- the JavaScript module used for AJAX and WebSockets. TypeError: Cannot read property 'write' of undefined

这是在脚本文件中导致错误的行:

await sails.helpers.fs.write.with({

任何想法可能有什么问题,尝试通过Google搜索解决方案,但找不到任何东西。我怀疑它可能与配置有关,因为我是从一个空的帆应用程序开始的。

编辑:

正在从脚本文件中调用失败的函数,您可以在Sails.js种子应用程序(第115行)中找到该文件:https://github.com/balderdashy/seed/blob/master/scripts/rebuild-cloud-sdk.js

1 个答案:

答案 0 :(得分:1)

基本上,我认为我无法使用任何类型的帮助程序,进一步的谷歌搜索使我转向https://github.com/sailshq/sails-hook-organics。原来我需要运行以下命令:

npm install sails-hook-organics --save

在构建我的应用程序时,选择了一个空种子(您要配置),这就是造成我问题的原因。