2016-04-01 8 views
6

これは問題を尋ねる代わりに答えを見つけたので、これが許されればうれしいです。私は1.2から1.3にアップグレードされ、ドッカーコンテナに配備された流星アプリを持っています。Meteor packages.json 1.2から1.3にアップグレードし、ドッカーのコンテナに展開するときのエラー回避策

/root/.meteor/packages/templating/.1.1.7.kbxyh0++os+web.browser+web.cordova/plugin.compileTemplatesBatch.os/npm/node_modules/meteor/promise/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:116 
     throw error; 
      ^
Error: Builder can not write without either data or a file path or a symlink path: os/packages/packages.json 
    at Builder.write (/tools/isobuild/builder.js:251:13) 
    at Builder.writeToGeneratedFilename (/tools/isobuild/builder.js:382:10) 
    at /tools/isobuild/isopack.js:1400:27 
    at Array.forEach (native) 
    at Function._.each._.forEach (/root/.meteor/packages/meteor-tool/.1.3.0_3.fc5itk++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11) 
    at _.each.builder.copyDirectory.from (/tools/isobuild/isopack.js:1372:11) 
    at Array.forEach (native) 
    at Function._.each._.forEach (/root/.meteor/packages/meteor-tool/.1.3.0_3.fc5itk++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11) 
    at /tools/isobuild/isopack.js:1263:9 
    at Isopack._.extend.saveToPath (/tools/isobuild/isopack.js:1641:7) 
    at /tools/isobuild/isopack-cache.js:323:23 
    at /tools/utils/buildmessage.js:359:18 
    at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14) 
    at /tools/utils/buildmessage.js:352:34 
    at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14) 
    at /tools/utils/buildmessage.js:350:23 
    at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14) 
    at Object.enterJob (/tools/utils/buildmessage.js:324:26) 
    at [object Object]._loadLocalPackage (/tools/isobuild/isopack-cache.js:260:18) 
    at /tools/isobuild/isopack-cache.js:194:16 
    at Function.time (/tools/tool-env/profile.js:305:10) 
    at /tools/isobuild/isopack-cache.js:193:17 
    at /tools/utils/buildmessage.js:359:18 
    at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14) 
    at /tools/utils/buildmessage.js:352:34 
    at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14) 
    at /tools/utils/buildmessage.js:350:23 
    at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14) 
    at Object.enterJob (/tools/utils/buildmessage.js:324:26) 
    at [object Object]._ensurePackageLoaded (/tools/isobuild/isopack-cache.js:184:20) 
    at /tools/isobuild/isopack-cache.js:75:14 
    at /tools/packaging/package-map.js:57:7 
    at Function._.each._.forEach (/root/.meteor/packages/meteor-tool/.1.3.0_3.fc5itk++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:87:22) 
    at [object Object].eachPackage (/tools/packaging/package-map.js:49:7) 
    at [object Object].buildLocalPackages (/tools/isobuild/isopack-cache.js:74:24) 
    at /tools/project-context.js:758:25 
    at /tools/utils/buildmessage.js:359:18 
    at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14) 
    at /tools/utils/buildmessage.js:352:34 
    at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14) 
    at /tools/utils/buildmessage.js:350:23 
    at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14) 
    at Object.enterJob (/tools/utils/buildmessage.js:324:26) 
    at ProjectContext._.extend._buildLocalPackages (/tools/project-context.js:757:18) 
    at /tools/project-context.js:278:9 
    at /tools/utils/buildmessage.js:359:18 
    at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14) 
    at /tools/utils/buildmessage.js:352:34 
    at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14) 
    at /tools/utils/buildmessage.js:350:23 
    at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14) 
    at Object.enterJob (/tools/utils/buildmessage.js:324:26) 
    at ProjectContext._completeStagesThrough (/tools/project-context.js:268:18) 
    at /tools/project-context.js:260:12 
    at Function.run (/tools/tool-env/profile.js:489:12) 
    at ProjectContext.prepareProjectForBuild (/tools/project-context.js:259:13) 
    at /tools/runners/run-app.js:557:29 
    at /tools/utils/buildmessage.js:271:13 
    at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14) 
    at /tools/utils/buildmessage.js:264:29 
    at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14) 
    at /tools/utils/buildmessage.js:262:18 
    at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14) 
    at /tools/utils/buildmessage.js:253:23 
    at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14) 
    at Object.capture (/tools/utils/buildmessage.js:252:19) 
    at bundleApp (/tools/runners/run-app.js:556:31) 
    at AppRunner._runOnce (/tools/runners/run-app.js:634:35) 
    at AppRunner._fiber (/tools/runners/run-app.js:887:28) 
    at /tools/runners/run-app.js:411:12 

私の最初の考えはinstall.meteor.comから最新の流星バージョンを引き下げないことがドッカ(http://thenewstack.io/understanding-the-docker-cache-for-faster-builds/)でのキャッシングの問題ということだったので、いくつかの奇妙なバージョンの不一致:私はこのエラーを取得しました。私はDockerfileにラインを変更することであることをことを解決:

RUN curl https://install.meteor.com/ | sh; echo "version 1.3"

素晴らしい、という問題を修正し、今私は、現在の流星バージョンを持っていましたが、私はまだエラーを取得したこと。この時点で、私たちはスプリントの真っ最中であるため、私の展開が必要でした。私たちは今日まで私の最も奇妙な解決策の1つに到達しました。

packageという名前のpackagesの中にシンボリックリンクを追加しました。 jsonは私のプロジェクトのメインディレクトリにあるpackages.jsonを指していました。

問題の根本原因と実際の解決方法についてコメントしたいと思っている人は、回避策が必要な他の人に役立ちます。まず

+1

ちょうどこれでもヒットしましたあなたの仕事を試してみるでしょう。おそらく古い方法でNPMパッケージを使用しているのでしょうか?しかし、今は別の方法で使用されていますか? – loken

答えて

0

は、問題のあるパッケージを取り除く:

meteor remove npm-container meteor remove meteorhacks:npm

は、その後、あなたはそれを新しい方法を行うために、任意の古いNpmRequireコードを修正する必要があります。 Meteor 1.3では、node.jsアプリケーションのようにnpmを使用できるようになりました。

import _ from 'underscore'またはvar _ = require('underscore')

http://guide.meteor.com/using-packages.htmlのためを参照してください。今、あなたは経由でアプリにそれをインポートすることができ、あなたのアプリ

に依存関係を追加する

meteor npm install --save underscore package.jsonを作成する

meteor npm init完全な説明

関連する問題