【问题标题】:npm start returning an errornpm 开始返回错误
【发布时间】:2018-12-31 23:03:55
【问题描述】:

在我的 mean.js 应用程序上运行“npm start”时遇到错误。我将粘贴终端输出和错误文件中的代码。

终端:

/Users/developer/dev-projects/Central-Repo/node_modules/rcloader/index.js:39
    if (err) throw err;
             ^

Error: ENOENT: no such file or directory, open '.csslintrc'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! meanjs@0.6.0 start: `gulp`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the meanjs@0.6.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional 
logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/developer/.npm/_logs/2018-07-24T09_18_22_923Z-debug.log

Index.js:(第 10 行代码错误)

var defaultFileGiven = (config.defaultFile !== undefined);
if (defaultFileGiven) {
if (finder.canLoadSync) {
  assign(config, finder.get(config.defaultFile));
} else {
  // push callbacks here that need to wait for config to load
  configPending = [];
  // force the async loader
  finder.get(config.defaultFile, function (err, defaults) {
    if (err) throw err;
    assign(config, defaults);

    // clear the configPending queue
    var cbs = configPending;
    configPending = null;
    cbs.forEach(function (cb) { cb(); });
  });
}

}

【问题讨论】:

    标签: javascript npm meanjs npm-start


    【解决方案1】:

    您的项目文件夹中似乎没有 .csslintrc 文件。您可以从 master 分支重新下载,然后重试。

    【讨论】:

    • 如果你可以去这个网址,你应该会看到文件:github.com/meanjs/mean 并单独下载文件并放入你的项目文件夹中。
    • 您是否熟悉 mongodb,因为它与 node.js 和平均堆栈有关?我有另一个问题/错误,懒得开始另一个线程。
    • 是的,请告诉我您在使用 mongodb 时遇到的问题类型。
    • 在我的平均应用程序中从终端运行“mongo”时遇到以下错误:
    • developer@Codys-MacBook-Pro-3:~/dev-projects/Central-Repo$ mongo MongoDB shell 版本 v4.0.0 连接到:mongodb://127.0.0.1:27017 2018-07 -24T06:38:53.326-0500 E QUERY [js] 错误:无法连接到服务器 127.0.0.1:27017,连接尝试失败:SocketException:连接到 127.0.0.1:27017 时出错:: 连接被拒绝: connect@src/mongo/shell/mongo.js:251:13 @(connect):1:6 异常:连接失败
    猜你喜欢
    • 1970-01-01
    • 2016-05-11
    • 2014-12-25
    • 2020-06-21
    • 1970-01-01
    • 1970-01-01
    • 2020-04-15
    • 1970-01-01
    • 2022-11-11
    相关资源
    最近更新 更多