0

I am having difficulty with an error when I run 'npm start' on my mean.js application. I will paste both the terminal output and the code from the file with the error.

Terminal:

/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: (error in 10th line of code)

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(); });
  });
}

}

Bahman Parsa Manesh
  • 2,314
  • 3
  • 16
  • 32
chody
  • 189
  • 1
  • 1
  • 10

1 Answers1

1

It seems .csslintrc file is not available in your project folder. You can re download this from the master branch and try again.

Shahriat Hossain
  • 340
  • 4
  • 12
  • If you can go to this url where you should see the file: https://github.com/meanjs/mean and download the file separately and put into your project folder. – Shahriat Hossain Jul 24 '18 at 11:10
  • Are you familiar with mongodb as it relates to node.js and the mean stack? I had another question/error and am too lazy to start another thread. – chody Jul 24 '18 at 11:44
  • Yes sure, let me know what type of problem you are facing with mongodb. – Shahriat Hossain Jul 24 '18 at 11:54
  • I am experiencing the following error when running 'mongo' from terminal within my mean app: – chody Jul 24 '18 at 11:58
  • developer@Codys-MacBook-Pro-3:~/dev-projects/Central-Repo$ mongo MongoDB shell version v4.0.0 connecting to: mongodb://127.0.0.1:27017 2018-07-24T06:38:53.326-0500 E QUERY [js] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused : connect@src/mongo/shell/mongo.js:251:13 @(connect):1:6 exception: connect failed – chody Jul 24 '18 at 11:59
  • That worked. But when I run 'npm start' on the entire application, it says that there is a 'MongoError.' Here is what I see: – chody Jul 24 '18 at 12:06
  • name: 'MongoError', message: 'failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]' } [07:04:12] [nodemon] clean exit - waiting for changes before restart – chody Jul 24 '18 at 12:06
  • have you tried to run nodemon using such command: nodemon app – Shahriat Hossain Jul 24 '18 at 12:09
  • This is the result from running 'nodemon app': – chody Jul 24 '18 at 12:32
  • [nodemon] 1.18.3 [nodemon] to restart at any time, enter `rs` [nodemon] watching: *.* [nodemon] starting `gulp app` [07:25:01] Using gulpfile ~/dev-projects/Central-Repo/gulpfile.js [07:25:01] Task 'app' is not in your gulpfile [07:25:01] Please check the documentation for proper gulpfile formatting [nodemon] app crashed - waiting for file changes before starting... – chody Jul 24 '18 at 12:33
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/176728/discussion-between-chody-and-shahriat-hossain). – chody Jul 25 '18 at 14:09