(gcloud.app.deploy)无法读取以下文件,因为它的路径
(gcloud.app.deploy) The following file couldn't be read because its path
我一直在尝试在 Google 云上部署 Meteor JS 应用程序,但一直出现此错误。我遵循了本教程 - https://cloud.google.com/community/tutorials/run-meteor-on-google-app-engine 这非常好并且易于理解。我不知道我得到的错误是否是由于我的配置错误造成的,但据我所知,我认为我已经虔诚地遵循了教程。
这是我的配置。我在 Windows 10 环境中工作。
{
"name": "myadminapps",
"private": true,
"scripts": {
"cleanup": "rmdir /s ..\bundle\",
"dist": "npm run cleanup && meteor build ..\ --directory --architecture os.linux.x86_64 --server-only",
"predeploy": "npm run dist && copy app.yaml ..\bundle\ && copy Dockerfile ..\bundle\",
"deploy": "npm run predeploy && (copy ..\bundle && gcloud app deploy -q)",
"start": "meteor run"
},
"dependencies": {
"addressparser": "^1.0.1",
"async": "^2.5.0"
},
"devDependencies": {
"bulk-email-verifier": "^1.0.4"
}
}
这是错误日志
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.
C:\Users\Kadeoya>cd C:\Programs\contract\myadminapps
C:\Programs\contract\myadminapps>npm run deploy
> myadminapps@ predeploy C:\Programs\contract\myadminapps
> npm run dist && copy app.yaml ..\bundle\ && copy Dockerfile ..\bundle\
> myadminapps@ dist C:\Programs\contract\myadminapps
> npm run cleanup && meteor build ..\ --directory --architecture os.linux.x86_64 --server-only
> myadminapps@ cleanup C:\Programs\contract\myadminapps
> rmdir /s ..\bundle\
..\bundle\, Are you sure (Y/N)? y
1 file(s) copied.
1 file(s) copied.
> myadminapps@ deploy C:\Programs\contract\myadminapps
> npm run predeploy && (copy ..\bundle && gcloud app deploy -q)
> myadminapps@ predeploy C:\Programs\contract\myadminapps
> npm run dist && copy app.yaml ..\bundle\ && copy Dockerfile ..\bundle\
> myadminapps@ dist C:\Programs\contract\myadminapps
> npm run cleanup && meteor build ..\ --directory --architecture os.linux.x86_64 --server-only
> myadminapps@ cleanup C:\Programs\contract\myadminapps
> rmdir /s ..\bundle\
..\bundle\, Are you sure (Y/N)? y
..\bundle\programs\server\npm\NODE_M~1\meteor\FORTAW~1\NODE_M~1\JSON-S~1 - The directory is not empty.
1 file(s) copied.
1 file(s) copied.
..\bundle\.node_version.txt
..\bundle\app.yaml
..\bundle\Dockerfile
..\bundle\main.js
..\bundle\README
..\bundle\star.json
6 file(s) copied.
Services to deploy:
descriptor: [C:\Programs\contract\myadminapps\app.yaml]
source: [C:\Programs\contract\myadminapps]
target project: [rabonni-184612]
target service: [default]
target version: [20171121t005558]
target url: [https://adminapps-184612.appspot.com]
Beginning deployment of service [default]...
Building and pushing image for service [default]
ERROR: (gcloud.app.deploy) The following file couldn't be read because its path is too long:
[C:\Programs\contract\myadminapps\.meteor\local\build\programs\server\npm\node_modules\meteor\reywood_publish-composite\node_modules\eslint-config-airbnb\node_modules\eslint-plugin-import\node_modules\eslint-import-resolver-node\node_modules\resolve\test\dotdot/*.*]
For more information on this issue and possible workarounds, please read the
following (links are specific to Node.js, but the information is generally
applicable):
* https://github.com/Microsoft/nodejstools/issues/69
* https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#max_path-explanation-and-workarounds
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! myadminapps@ deploy: `npm run predeploy && (copy ..\bundle && gcloud app deploy -q)`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the myadminapps@ deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Kadeoya\AppData\Roaming\npm-cache\_logs17-11-21T08_57_10_491Z-debug.log
C:\Programs\contract\myadminapps>
该日志中的相关行是这样的:
The following file couldn't be read because its path is too long:
由于嵌套的节点模块,npm
在 windows 中的 npm v3 之前是一个常见问题。 npm v3 及更高版本现在尝试尽可能地扁平化依赖图,这有助于处理 windows 路径限制。
您使用的是哪个版本的 Meteor?您在全球范围内使用哪个版本的 npm?
尝试 meteor npm run deploy
使用与 meteor 捆绑的版本。
一个有时有效的快速修复方法是将您的 meteor 应用程序目录复制到 c:/myapp
以减少构建前的路径长度。
我一直在尝试在 Google 云上部署 Meteor JS 应用程序,但一直出现此错误。我遵循了本教程 - https://cloud.google.com/community/tutorials/run-meteor-on-google-app-engine 这非常好并且易于理解。我不知道我得到的错误是否是由于我的配置错误造成的,但据我所知,我认为我已经虔诚地遵循了教程。
这是我的配置。我在 Windows 10 环境中工作。
{
"name": "myadminapps",
"private": true,
"scripts": {
"cleanup": "rmdir /s ..\bundle\",
"dist": "npm run cleanup && meteor build ..\ --directory --architecture os.linux.x86_64 --server-only",
"predeploy": "npm run dist && copy app.yaml ..\bundle\ && copy Dockerfile ..\bundle\",
"deploy": "npm run predeploy && (copy ..\bundle && gcloud app deploy -q)",
"start": "meteor run"
},
"dependencies": {
"addressparser": "^1.0.1",
"async": "^2.5.0"
},
"devDependencies": {
"bulk-email-verifier": "^1.0.4"
}
}
这是错误日志
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.
C:\Users\Kadeoya>cd C:\Programs\contract\myadminapps
C:\Programs\contract\myadminapps>npm run deploy
> myadminapps@ predeploy C:\Programs\contract\myadminapps
> npm run dist && copy app.yaml ..\bundle\ && copy Dockerfile ..\bundle\
> myadminapps@ dist C:\Programs\contract\myadminapps
> npm run cleanup && meteor build ..\ --directory --architecture os.linux.x86_64 --server-only
> myadminapps@ cleanup C:\Programs\contract\myadminapps
> rmdir /s ..\bundle\
..\bundle\, Are you sure (Y/N)? y
1 file(s) copied.
1 file(s) copied.
> myadminapps@ deploy C:\Programs\contract\myadminapps
> npm run predeploy && (copy ..\bundle && gcloud app deploy -q)
> myadminapps@ predeploy C:\Programs\contract\myadminapps
> npm run dist && copy app.yaml ..\bundle\ && copy Dockerfile ..\bundle\
> myadminapps@ dist C:\Programs\contract\myadminapps
> npm run cleanup && meteor build ..\ --directory --architecture os.linux.x86_64 --server-only
> myadminapps@ cleanup C:\Programs\contract\myadminapps
> rmdir /s ..\bundle\
..\bundle\, Are you sure (Y/N)? y
..\bundle\programs\server\npm\NODE_M~1\meteor\FORTAW~1\NODE_M~1\JSON-S~1 - The directory is not empty.
1 file(s) copied.
1 file(s) copied.
..\bundle\.node_version.txt
..\bundle\app.yaml
..\bundle\Dockerfile
..\bundle\main.js
..\bundle\README
..\bundle\star.json
6 file(s) copied.
Services to deploy:
descriptor: [C:\Programs\contract\myadminapps\app.yaml]
source: [C:\Programs\contract\myadminapps]
target project: [rabonni-184612]
target service: [default]
target version: [20171121t005558]
target url: [https://adminapps-184612.appspot.com]
Beginning deployment of service [default]...
Building and pushing image for service [default]
ERROR: (gcloud.app.deploy) The following file couldn't be read because its path is too long:
[C:\Programs\contract\myadminapps\.meteor\local\build\programs\server\npm\node_modules\meteor\reywood_publish-composite\node_modules\eslint-config-airbnb\node_modules\eslint-plugin-import\node_modules\eslint-import-resolver-node\node_modules\resolve\test\dotdot/*.*]
For more information on this issue and possible workarounds, please read the
following (links are specific to Node.js, but the information is generally
applicable):
* https://github.com/Microsoft/nodejstools/issues/69
* https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#max_path-explanation-and-workarounds
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! myadminapps@ deploy: `npm run predeploy && (copy ..\bundle && gcloud app deploy -q)`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the myadminapps@ deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Kadeoya\AppData\Roaming\npm-cache\_logs17-11-21T08_57_10_491Z-debug.log
C:\Programs\contract\myadminapps>
该日志中的相关行是这样的:
The following file couldn't be read because its path is too long:
由于嵌套的节点模块,npm
在 windows 中的 npm v3 之前是一个常见问题。 npm v3 及更高版本现在尝试尽可能地扁平化依赖图,这有助于处理 windows 路径限制。
您使用的是哪个版本的 Meteor?您在全球范围内使用哪个版本的 npm?
尝试 meteor npm run deploy
使用与 meteor 捆绑的版本。
一个有时有效的快速修复方法是将您的 meteor 应用程序目录复制到 c:/myapp
以减少构建前的路径长度。