航行初始化错误

路易斯

我正在构建一个Sails应用程序,突然它停止工作。我运行sudo node app.js启动应用程序,并在终端上引发了错误:

A hook (`userconfig`) failed to load!
error: Error: Invalid module: [object Object],(...)

我试图重新安装所有模块,但是没有运气。我已经读过一些问题,例如这里这里,但这不是我想要的。我将在这里提供我的package.json文件,以防有人需要阅读:

{
    "name": "myapp",
    "private": true,
    "version": "0.0.1",
    "description": "my app description",
    "keywords": [],
    "dependencies": {
        "bcrypt": "~0.7.6",
        "ejs": "~0.8.4",
        "grunt": "0.4.2",
        "grunt-contrib-clean": "~0.5.0",
        "grunt-contrib-coffee": "~0.10.1",
        "grunt-contrib-concat": "~0.3.0",
        "grunt-contrib-copy": "~0.5.0",
        "grunt-contrib-cssmin": "~0.9.0",
        "grunt-contrib-jst": "~0.6.0",
        "grunt-contrib-less": "0.11.1",
        "grunt-contrib-uglify": "~0.4.0",
        "grunt-contrib-watch": "~0.5.3",
        "grunt-sails-linker": "~0.9.5",
        "grunt-sync": "~0.0.4",
        "include-all": "~0.1.3",
        "mqtt": "^1.0.8",
        "node-uuid": "^1.4.2",
        "passport": "^0.2.1",
        "passport-local": "^1.0.0",
        "rc": "~0.5.0",
        "sails": "~0.10.5",
        "sails-disk": "~0.10.0",
        "sails-mysql": "^0.10.11"
    },
    "scripts": {
        "start": "node app.js",
        "debug": "node debug app.js"
    },
    "main": "app.js",
    "repository": {
        "type": "git",
        "url": "my repo"
    },
    "author": "Me",
    "license": ""
}

任何帮助都很棒...我提供了我认为有必要的信息,但是如果需要,我会提供更多信息。

编辑:我在这里看到了更多问题但也没有用。

格伦·斯威夫特

您的应用程序由于某种原因无法加载配置文件。您可能在配置之一中出现语法错误,配置数据冲突或.sailsrc中配置的更改路径。

config目录中不应包含.json文件。似乎Sails从其中加载了每个文件,并尝试将其识别为配置模块

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章