简体   繁体   English

当我在Google云应用引擎上使用Markojs部署应用程序Nodejs和Markojs时,出现错误“ EROFS:只读文件系统…”。

[英]When I deploy the application Nodejs with Markojs at google cloud app engine, I receive the error “EROFS: read-only file system…'”

I'm new in Google Cloud Resources. 我是Google Cloud Resources的新手。

I'm deploying a Nodejs(with Markojs) application at google cloud's app engine and I'm getting the error "EROFS: read-only file system, open '/srv/src/app/converter/form/.7.1565968890124.converter.marko.js'" 我正在Google Cloud的应用程序引擎上部署Nodejs(带有Markojs)应用程序,并且收到错误消息“ EROFS:只读文件系统,打开'/srv/src/app/converter/form/.7.1565968890124.converter。 marko.js'”

At Google documentaion is said "Filesystem The runtime includes a full filesystem. The filesystem is read-only except for the location /tmp, which is a virtual disk storing data in your App Engine instance's RAM." 在Google documentaion上说“文件系统运行时包括一个完整的文件系统。文件系统是只读的,但位置/ tmp除外,该位置是将数据存储在App Engine实例的RAM中的虚拟磁盘。”

Link: https://cloud.google.com/appengine/docs/standard/nodejs/runtime#filesystem 链接: https//cloud.google.com/appengine/docs/standard/nodejs/runtime#filesystem

I ran "echo $PATH" from "Production environment" and I got "/srv/node_modules/.bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" 我从“生产环境”运行了“ echo $ PATH”,得到了“ /srv/node_modules/.bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/ sbin:/ bin“

I'm trying set up the environment variable "PATH" in order to fix the path "/srv/.node_modules to /tmp/.node_modules". 我正在尝试设置环境变量“ PATH”,以将路径“ /srv/.node_modules修复为/tmp/.node_modules”。 I don't know whether it'll fix the problem. 我不知道是否能解决问题。

On app.yaml file I wrote, 在我写的app.yaml文件中,

#   Copyright 2018, Google LLC.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# [START runtime]
runtime: nodejs10

env_variables:
  ## Put production environment variables here.
  ## PATH: /tmp/node_modules/.bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  PATH: /tmp/node_modules/.bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  _: /tmp
  HOME: /tmp

The full error is: 完整的错误是:

Error: EROFS: read-only file system, open '/srv/src/app/converter/form/.7.1565968890124.converter.marko.js' at Object.openSync (fs.js:443:3) at Object.writeFileSync (fs.js:1194:35) at compile (/srv/node_modules/marko/dist/node-require/index.js:61:16) at Object.markoRequireExtension [as .marko] (/srv/node_modules/marko/dist/node-require/index.js:115:27) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Module.require (internal/modules/cjs/loader.js:690:17) at require (internal/modules/cjs/helpers.js:25:18) 错误:EROFS:只读文件系统,在Object.openFile(fs.js:443:3)的Object.openFile('srv / src / app / converter / form / .7.1565968890124.converter.marko.js'中打开( fs.js:1194:35),位于Object.markoRequireExtension [as .marko](/ srv / node_modules / marko / dist)(/srv/node_modules/marko/dist/node-require/index.js:61:16) /node-require/index.js:115:27)位于try.ModuleLoad(内部/模块/cjs/loader.js:593:12)处的Module.load(内部/模块/cjs/loader.js:653:32) Function.Module._load(internal / modules / cjs / loader.js:585:3)位于require。(internal / modules / cjs / loader.js:690:17)处,位于require(internal / modules / cjs / helpers)中。 js:25:18)
at Bin2DecView.get template [as template] (/srv/src/app/converter/Bin2DecView.js:9:16) 在Bin2DecView.get模板[作为模板](/srv/src/app/converter/Bin2DecView.js:9:16)

Thank you very much in advance! 提前非常感谢您!

The marko/node-require hook writes to the filesystem by default, but you can configure this: marko/node-require挂钩默认情况下会写入文件系统,但是您可以配置以下内容:

require("marko/node-require").install({
  writeToDisk: false
});

src/compiler/config.js#L32-L37 src / compiler / config.js#L32-L37

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Google App Engine 上的 NestJS 项目显示错误“无法写入文件”&&“EROFS:只读文件系统” - NestJS Project on Google App Engine shows error "Could not write file" && " EROFS: read-only file system" 在 Heroku 中部署 Angular 应用程序错误 - mkdir '/dist' 错误:EROFS: 只读文件系统,mkdir '/dist' - Deploy Angular App in Heroku Error - mkdir '/dist' Error: EROFS: read-only file system, mkdir '/dist' 错误:EROFS:只读文件系统,使用无服务器部署时 mkdir '/home/sbx_user1063' - Error: EROFS: read-only file system, mkdir '/home/sbx_user1063' when deploy using serverless 错误:EROFS:只读文件系统 [MAC] - Error: EROFS: read-only file system [MAC] Dialogflow,nodejs:文件系统模块-错误:EROFS:只读文件系统,在错误处打开“ filename.pdf”(本机) - Dialogflow, nodejs: File System module - Error: EROFS: read-only file system, open 'filename.pdf' at Error (native) 让 Event Bridge Atlas 在 lambda 函数中工作:错误:EROFS:只读文件系统 - Getting Event Bridge Atlas working in a lambda function: Error: EROFS: read-only file system 错误:EROFS:在 Lambda 中流式传输 xlsx 内容时只读文件系统 - Error: EROFS: read-only file system while streaming the xlsx content in Lambda 错误:监听 EROFS:只读文件系统 /auth 与 Node 和 Express - Error: listen EROFS: read-only file system /auth with Node and Express NPM 错误:错误:EROFS:只读文件系统,mkdir '/npm' - NPM Error : Error: EROFS: read-only file system, mkdir '/npm' 收到错误 AWS Lambda:EROFS:只读文件系统,打开“/var/task/assets/docs.zip” - Getting error AWS Lambda : EROFS: read-only file system, open '/var/task/assets/docs.zip'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM