Node.js 当我在google cloud app engine上使用Markojs部署应用程序Nodejs时,我收到错误消息;EROFS:只读文件系统…'&引用;
我是谷歌云资源的新手 我正在谷歌云的应用程序引擎上部署一个Nodejs(带有Markojs)应用程序,我得到了一个错误“EROFS:read-only filesystem,open'/srv/src/app/converter/form/.7.1565968890124.converter.marko.js” 在谷歌,Documentation被称为“文件系统” 运行时包括一个完整的文件系统。该文件系统是只读的,但location/tmp除外,它是一个虚拟磁盘,用于在应用程序引擎实例的RAM中存储数据。” 链接: 我从“生产环境”运行了“echo$PATH”,得到了“/srv/node_modules/.bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin” 我正在尝试设置环境变量“PATH”,以修复路径“/srv/.node\u modules到/tmp/.node\u modules”。我不知道它是否能解决这个问题 在我写的app.yaml文件中Node.js 当我在google cloud app engine上使用Markojs部署应用程序Nodejs时,我收到错误消息;EROFS:只读文件系统…'&引用;,node.js,google-app-engine,marko,Node.js,Google App Engine,Marko,我是谷歌云资源的新手 我正在谷歌云的应用程序引擎上部署一个Nodejs(带有Markojs)应用程序,我得到了一个错误“EROFS:read-only filesystem,open'/srv/src/app/converter/form/.7.1565968890124.converter.marko.js” 在谷歌,Documentation被称为“文件系统” 运行时包括一个完整的文件系统。该文件系统是只读的,但location/tmp除外,它是一个虚拟磁盘,用于在应用程序引擎实例的RAM中
# 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
完全错误是:
错误:EROFS:read-only文件系统,在Object.openSync(fs.js:443:3)的Object.writeFileSync(fs.js:1194:35)处打开'/srv/src/app/converter/form/.7.1565968890124.converter.marko.js'
编译(/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)
tryModuleLoad(internal/modules/cjs/loader.js:593:12)at Function.Module.\u 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)在Bin2DecView.get template[作为模板](/srv/src/app/converter/Bin2DecView.js:9:16)
提前非常感谢 默认情况下,
marko/node需要
hook写入文件系统,但您可以配置:
require("marko/node-require").install({
writeToDisk: false
});
非常感谢您!在第一个时刻,我做了这个配置,但一开始没有工作。因此,我不得不删除文件夹节点_模块和“npm安装”再次,然后工作!