meteorpackages.json错误解决方法从1.2升级到1.3和部署在docker集装箱
所以这是一个问题,我find了答案,而不是问一个问题,所以希望这是允许的。 我有一个meteor应用程序,从1.2升级到1.3,并部署到docker集装箱。 我得到这个错误:
/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_server.js:116 抛出错误; ^ 错误:生成器无法写入数据或文件path或符号链接path:os / packages / packages.json 在Builder.write(/tools/isobuild/builder.js:251:13) 在Builder.writeToGeneratedFilename(/tools/isobuild/builder.js:382:10) 在/tools/isobuild/isopack.js:1400:27 在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.js:79:11) 在_.each.builder.copyDirectory.from(/tools/isobuild/isopack.js:1372:11) 在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.js:79:11) 在/tools/isobuild/isopack.js:1263:9 在Isopack ._。extend.saveToPath(/tools/isobuild/isopack.js:1641:7) 在/tools/isobuild/isopack-cache.js:323:23 在/tools/utils/buildmessage.js:359:18 在[object Object] .withValue(/tools/utils/fiber-helpers.js:89:14) 在/tools/utils/buildmessage.js:352:34 在[object Object] .withValue(/tools/utils/fiber-helpers.js:89:14) 在/tools/utils/buildmessage.js:350:23 在[object Object] .withValue(/tools/utils/fiber-helpers.js:89:14) 在Object.enterJob(/tools/utils/buildmessage.js:324:26) 在[object Object] ._ loadLocalPackage(/tools/isobuild/isopack-cache.js:260:18) 在/tools/isobuild/isopack-cache.js:194:16 在Function.time(/tools/tool-env/profile.js:305:10) 在/tools/isobuild/isopack-cache.js:193:17 在/tools/utils/buildmessage.js:359:18 在[object Object] .withValue(/tools/utils/fiber-helpers.js:89:14) 在/tools/utils/buildmessage.js:352:34 在[object Object] .withValue(/tools/utils/fiber-helpers.js:89:14) 在/tools/utils/buildmessage.js:350:23 在[object Object] .withValue(/tools/utils/fiber-helpers.js:89:14) 在Object.enterJob(/tools/utils/buildmessage.js:324:26) 在[object Object] ._ ensurePackageLoaded(/tools/isobuild/isopack-cache.js:184:20) 在/tools/isobuild/isopack-cache.js:75:14 在/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.js:87:22) 在[object Object] .eachPackage(/tools/packaging/package-map.js:49:7) 在[object Object] .buildLocalPackages(/tools/isobuild/isopack-cache.js:74:24) 在/tools/project-context.js:758:25 在/tools/utils/buildmessage.js:359:18 在[object Object] .withValue(/tools/utils/fiber-helpers.js:89:14) 在/tools/utils/buildmessage.js:352:34 在[object Object] .withValue(/tools/utils/fiber-helpers.js:89:14) 在/tools/utils/buildmessage.js:350:23 在[object Object] .withValue(/tools/utils/fiber-helpers.js:89:14) 在Object.enterJob(/tools/utils/buildmessage.js:324:26) 在ProjectContext ._。extend._buildLocalPackages(/tools/project-context.js:757:18) 在/tools/project-context.js:278:9 在/tools/utils/buildmessage.js:359:18 在[object Object] .withValue(/tools/utils/fiber-helpers.js:89:14) 在/tools/utils/buildmessage.js:352:34 在[object Object] .withValue(/tools/utils/fiber-helpers.js:89:14) 在/tools/utils/buildmessage.js:350:23 在[object Object] .withValue(/tools/utils/fiber-helpers.js:89:14) 在Object.enterJob(/tools/utils/buildmessage.js:324:26) 在ProjectContext._completeStagesThrough(/tools/project-context.js:268:18) 在/tools/project-context.js:260:12 在Function.run(/tools/tool-env/profile.js:489:12) 在ProjectContext.prepareProjectForBuild(/tools/project-context.js:259:13) 在/tools/runners/run-app.js:557:29 在/tools/utils/buildmessage.js:271:13 在[object Object] .withValue(/tools/utils/fiber-helpers.js:89:14) 在/tools/utils/buildmessage.js:264:29 在[object Object] .withValue(/tools/utils/fiber-helpers.js:89:14) 在/tools/utils/buildmessage.js:262:18 在[object Object] .withValue(/tools/utils/fiber-helpers.js:89:14) 在/tools/utils/buildmessage.js:253:23 在[object Object] .withValue(/tools/utils/fiber-helpers.js:89:14) 在Object.capture处(/tools/utils/buildmessage.js:252:19) 在bundleApp(/tools/runners/run-app.js:556:31) 在AppRunner._runOnce(/tools/runners/run-app.js:634:35) 在AppRunner._fiber(/tools/runners/run-app.js:887:28) 在/tools/runners/run-app.js:411:12
我首先想到的是,docker( http://thenewstack.io/understanding-the-docker-cache-for-faster-builds/ )没有从install.meteor.com下载最新的meteor版本,这是一个caching问题,因此一些奇怪的版本不匹配。 我通过将Dockerfile中的行更改为:
RUN curl https://install.meteor.com/ | sh; echo "version 1.3"
真棒,这解决了这个问题,现在我有当前的meteor版本,但我仍然得到错误。 在这一点上,我只是需要我的部署工作,因为我们正处于冲刺的中间,到目前为止,我们到达了我最棘手的解决scheme之一:
我在名为packages.json的包目录中添加了一个符号链接,它指向我的项目主目录下的packages.json。
如果有人想评论问题的根本原因是什么,以及一个真棒解决scheme,但希望这可以帮助其他需要解决方法的人。
首先摆脱违规的软件包:
meteor remove npm-container
meteor remove meteorhacks:npm
meteor remove npm-container
meteor remove meteorhacks:npm
然后,您需要修复任何旧的NpmRequire代码,以新的方式做到这一点。 在Meteor 1.3中,现在可以像使用任何node.js应用程序一样使用npm。
meteor npm init
来创buildpackage.json
meteor npm install --save underscore
在您的应用程序中添加依赖项
现在您可以通过以下方式将其导入您的应用:
import _ from 'underscore'
或var _ = require('underscore')
请参阅http://guide.meteor.com/using-packages.html获取完整的解释
- polkit-gnome-authentication-agent-1无法在没有特权标志的docker中启动
- Dockerloginauthentication令牌
- Docker撰写:Rails将不尊重DATABASE_URL连接到Postgres
- Docker容器的IO性能
- dockernetworking链接到2个或多个容器
- PhpStorm只运行本地PHPUnitconfiguration。 如何强制它使用远程(Docker)?
- Go和Docker:当我使用stdlib时,我能够运行一个去web服务器,当我使用自定义包发生错误
- Java Maven项目中的Docker指令跳过testing
- 新的docker集装箱为每个用户