部署heroku nodejs应用程序时出错

时间:2017-08-25 07:27:34

标签: node.js heroku

当我部署应用程序时,我收到错误 - 错误:EROFS:只读文件系统,打开' /access.log'在错误(本机) 发生了什么事? index.js:

var app = require('./src/app');

app.set('port', (process.env.PORT || 5000));

enter code here

app.listen(app.get('port'), function() {
    console.log('Node app is running on port', app.get('port'));
});

1 个答案:

答案 0 :(得分:1)

如果您使用的是纱线,最新版本之一(1.0.0rc?)会导致此问题。如果你将package.json引擎配置中的yarn version explicity设置为早期版本,如0.27.5,那么应解决你的问题。即:

"engines": {
  "node": "8.2.1",
  "yarn": "0.27.5"
},

至少这为我解决了这个问题。

相关问题