【问题标题】:sails.js stopped to work after cloning from repository从存储库克隆后,sails.js 停止工作
【发布时间】:2020-01-18 03:04:56
【问题描述】:

添加到 git 并将 sails.js 应用程序克隆回另一个桌面后,我的应用程序停止正常工作。例如我能够成功运行sails lift 命令,但是在尝试加载登录页面时,我发现该页面未正确加载:

并且我在浏览器控制台中收到多个错误(后端控制台正常并且不会丢弃任何错误):

cloud.setup.js:13 Uncaught ReferenceError: Cloud is not defined
    at cloud.setup.js:13

Uncaught ReferenceError: parasails is not defined
    at ajax-button.component.js:12

ajax-form.component.js:20 Uncaught ReferenceError: parasails is not defined
    at ajax-form.component.js:20

Uncaught ReferenceError: parasails is not defined
    at js-timestamp.component.js:15
...

我检查了 node_modules 文件夹,其中包含滑翔伞。

我没有将 node_module 包含到我的 repo 中,因为我可以在克隆后始终运行 npm install

我成功地在我的桌面上创建并成功运行了一个新的sails.js 应用程序,没有任何问题。

所以,我推送或未推送到git的文件一定有错误。

【问题讨论】:

    标签: npm sails.js


    【解决方案1】:

    在 .gitignore 文件中,我排除了 dependencies/ 文件夹。

    该规则排除了 assets/dependencies 子文件夹中的任何文件,其中包含许多sails.js 文件,例如parasails.js 等

    【讨论】:

      猜你喜欢
      • 2020-08-08
      • 2013-12-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-02-05
      • 2020-06-03
      • 2018-03-07
      • 2021-12-31
      相关资源
      最近更新 更多