LoginSignup
1
0

More than 5 years have passed since last update.

WebstormでExpressプロジェクトを開いたらindexing...の無限ループに陥った

Posted at

環境

  • OSX High Sierra
  • node 9.8.0
  • npm 5.7.1
  • Express 4.16.0

再現手順

以下手順でExpressのsampleapp作成。

npm i -g express
npm i -g express-generator
express sampleapp

sampleappをWebstormで開いて作業しているとindexing...(Webstormのコード解析)が無限ループを始めた。
あれこれ試しているうちにapp.jsを開いている時に再現することを突き止める。
最終的に、

app.js
// error handler
app.use(function(err, req, res, next) {
  // set locals, only providing error in development
  res.locals.message = err.message;
  res.locals.error = req.app.get('env') === 'development' ? err : {};

  // render the error page
  res.status(err.status || 500);
  res.render('error');
});

↑の部分のソースを削除するとループしなくなった。

無限ループの原因は依然不明。
気持ち悪いが、取り急ぎの対処として。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0