sails.js从存储库克隆后停止工作

问题描述 投票:0回答:1

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

enter image description here

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

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文件夹,并在其中包含了parasails。

我没有将node_module包含到我的仓库中,因为克隆后我总是可以运行npm install

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

因此,我推送或未推送到git的文件一定存在错误。

npm sails.js
1个回答
0
投票

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

该规则不包括

assets / dependencies

子文件夹中的任何文件,该子文件夹中放置了许多sails.js文件,例如parasails.js等
© www.soinside.com 2019 - 2024. All rights reserved.