0

Google 클라우드에 Meteor JS 앱을 배포하려고했지만이 오류가 계속 발생합니다. 나는이 튜토리얼 (https://cloud.google.com/community/tutorials/run-meteor-on-google-app-engine)을 따라 갔는데, 정말 따라하기 쉽고 이해하기 쉽다. 내가 얻는 오류가 내 구성의 오류의 결과인지는 모르겠지만 최선을 다해 내가 종교적으로 튜토리얼을 따라 갔다고 생각한다.(gcloud.app.deploy) 경로가 다음과 같아서 읽을 수 없습니다.

이것은 내 설정입니다. 나는 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 

> [email protected] predeploy C:\Programs\contract\myadminapps 
> npm run dist && copy app.yaml ..\bundle\ && copy Dockerfile ..\bundle\ 


> [email protected] dist C:\Programs\contract\myadminapps 
> npm run cleanup && meteor build ..\ --directory --architecture os.linux.x86_64 --server-only 


> [email protected] cleanup C:\Programs\contract\myadminapps 
> rmdir /s ..\bundle\ 

..\bundle\, Are you sure (Y/N)? y 
     1 file(s) copied. 
     1 file(s) copied. 

> [email protected] deploy C:\Programs\contract\myadminapps 
> npm run predeploy && (copy ..\bundle && gcloud app deploy -q) 


> [email protected] predeploy C:\Programs\contract\myadminapps 
> npm run dist && copy app.yaml ..\bundle\ && copy Dockerfile ..\bundle\ 


> [email protected] dist C:\Programs\contract\myadminapps 
> npm run cleanup && meteor build ..\ --directory --architecture os.linux.x86_64 --server-only 


> [email protected] 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! [email protected] deploy: `npm run predeploy && (copy ..\bundle && gcloud app deploy -q)` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] 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\_logs\2017-11-21T08_57_10_491Z-debug.log 

C:\Programs\contract\myadminapps> 

답변

1

: 창에서 npm 이전에 NPM v3에있는 일반적인 문제였다

The following file couldn't be read because its path is too long:

중첩 된 노드 모듈 때문입니다. npm v3 이상에서는 종속성 그래프를 최대한 평평하게하려고합니다. 이는 Windows 경로 제한을 처리하는 데 많은 도움이됩니다.

어떤 버전의 Meteor를 사용하고 있습니까? 그리고 npm의 어떤 버전을 전세계에 사용하고 있습니까? meteor npm run deploy을 사용해 유성에 번들 된 버전을 사용하십시오.

가끔 빠른 수정은 유령 앱 디렉토리를 c:/myapp으로 복사하여 빌드하기 전에 경로 길이를 줄이는 것입니다.