我正在尝试创建与公共级别相同的隐藏点文件夹,以提供我每天生成的静态文件。
var fs = Npm.require('fs');
Meteor.startup(function() {
var dir = './../../../../../.files';
if (!fs.existsSync(dir)){
fs.mkdirSync(dir);
}
routePath = fs.realpathSync(dir);
})
一切都在生产中运行,但在部署过程中出现错误:调用部署过程:失败
日志显示我无法创建此文件夹:
Error: EACCES, permission denied './../../../../../.files'
at Object.fs.mkdirSync (fs.js:654:18)
at Router.map.route.where (server/server_router.js:7:10)
at /opt/appname/app/programs/server/boot.js:249:5
error: Forever detected script exited with code: 7
error: Script restart attempt #14