最佳答案
我使用 ESLinter 做一个简单的节点项目,下面是 index.js 中的唯一代码:
const express = require('express');
const app = express();
app.get('/', (req, res) => {
res.send({
hi: 'there'
});
});
const PORT = process.env.PORT || 5000;
app.listen(PORT);
我正在使用 VSCode
编辑器。它自动运行 ESLint 的 JS 代码。
在 IDE 中,我看到下面最后一行的错误-
[eslint] 'process' is not defined. (no-undef)
知道是怎么回事吗?