Urigo / meteor-client-bundler

https://blog.meteor.com/leverage-the-power-of-meteor-with-any-client-side-framework-bfb909141008
MIT License
193 stars 41 forks source link

meteor-client bundle fails #17

Closed darkbasic closed 7 years ago

darkbasic commented 7 years ago
$ npm run meteor-client:bundle

> ionic-hello-world@ meteor-client:bundle /home/niko/WebstormProjects/whatsapp_2
> meteor-client bundle -s api -c meteor-client.config.json

/home/niko/.meteor/packages/meteor-tool/.1.4.4_1.1t9hste++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:190
      throw error;
      ^

SyntaxError: Unexpected token 
    at Object.parse (native)
    at /tools/packaging/catalog/catalog-remote.js:873:19
    at Array.map (native)
    at Function._.map._.collect (/home/niko/.meteor/packages/meteor-tool/.1.4.4_1.1t9hste++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:97:56)
    at [object Object]._.extend._contentQuery (/tools/packaging/catalog/catalog-remote.js:872:14)
    at [object Object]._.extend.getSortedVersionRecords (/tools/packaging/catalog/catalog-remote.js:568:31)
    at [object Object]._.extend._returnFirst (/tools/packaging/catalog/catalog.js:190:12)
    at [object Object]._.extend.getSortedVersionRecords (/tools/packaging/catalog/catalog.js:202:17)
    at [object Object].CS.CatalogLoader._getSortedVersionRecords (packages/constraint-solver.js:333:20)
    at [object Object].CS.CatalogLoader.loadAllVersions (packages/constraint-solver.js:362:26)
    at [object Object].CS.CatalogLoader.loadAllVersionsRecursive (packages/constraint-solver.js:395:10)
    at [object Object].CS.Input.loadFromCatalog (packages/constraint-solver.js:562:17)
    at packages/constraint-solver.js:2217:15
    at Function.time (/tools/tool-env/profile.js:305:10)
    at [object Object].CS.PackagesResolver.resolve (packages/constraint-solver.js:2214:13)
    at /tools/project-context.js:533:35
    at Function.time (/tools/tool-env/profile.js:305:10)
    at /tools/project-context.js:529:19
    at /tools/utils/buildmessage.js:359:18
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:352:34
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:350:23
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at Object.enterJob (/tools/utils/buildmessage.js:324:26)
    at /tools/project-context.js:501:20
    at /tools/packaging/catalog/catalog.js:100:5
    at /tools/utils/buildmessage.js:271:13
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:264:29
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:262:18
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:253:23
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at Object.capture (/tools/utils/buildmessage.js:252:19)
    at Object.catalog.runAndRetryWithRefreshIfHelpful (/tools/packaging/catalog/catalog.js:99:31)
    at ProjectContext._resolveConstraints (/tools/project-context.js:500:13)
    at /tools/project-context.js:283:9
    at /tools/utils/buildmessage.js:359:18
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:352:34
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:350:23
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at Object.enterJob (/tools/utils/buildmessage.js:324:26)
    at ProjectContext._.extend._completeStagesThrough (/tools/project-context.js:273:18)
    at /tools/project-context.js:265:12
    at Function.run (/tools/tool-env/profile.js:490:12)
    at ProjectContext._.extend.prepareProjectForBuild (/tools/project-context.js:264:13)
    at /tools/cli/commands.js:741:20
    at /tools/utils/buildmessage.js:271:13
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:264:29
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:262:18
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:253:23
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at Object.capture (/tools/utils/buildmessage.js:252:19)
    at Object.main.captureAndExit (/tools/cli/main.js:273:29)
    at Command.func (/tools/cli/commands.js:715:8)
    at /tools/cli/main.js:1483:23
/usr/lib/node_modules/meteor-client-bundler/node_modules/execa/index.js:277
                throw (result.error || new Error(result.stderr === '' ? result.stdout : result.stderr));
                ^

Error: null
    at Function.module.exports.sync (/usr/lib/node_modules/meteor-client-bundler/node_modules/execa/index.js:277:26)
    at Object.bundle (/usr/lib/node_modules/meteor-client-bundler/lib/bundler.js:35:9)
    at Command.<anonymous> (/usr/lib/node_modules/meteor-client-bundler/cli:42:13)
    at Command.listener (/usr/lib/node_modules/meteor-client-bundler/node_modules/commander/index.js:301:8)
    at emitTwo (events.js:106:13)
    at Command.emit (events.js:194:7)
    at Command.parseArgs (/usr/lib/node_modules/meteor-client-bundler/node_modules/commander/index.js:615:12)
    at Command.parse (/usr/lib/node_modules/meteor-client-bundler/node_modules/commander/index.js:458:21)
    at Object.<anonymous> (/usr/lib/node_modules/meteor-client-bundler/cli:50:9)
    at Module._compile (module.js:571:32)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ionic-hello-world@ meteor-client:bundle: `meteor-client bundle -s api -c meteor-client.config.json`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ionic-hello-world@ meteor-client:bundle script 'meteor-client bundle -s api -c meteor-client.config.json'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ionic-hello-world package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     meteor-client bundle -s api -c meteor-client.config.json
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs ionic-hello-world
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls ionic-hello-world
npm ERR! There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/niko/.npm/_logs/2017-04-20T14_35_26_655Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'meteor-client:bundle' ]
2 info using npm@4.5.0
3 info using node@v7.7.3
4 verbose run-script [ 'premeteor-client:bundle',
4 verbose run-script   'meteor-client:bundle',
4 verbose run-script   'postmeteor-client:bundle' ]
5 info lifecycle ionic-hello-world@~premeteor-client:bundle: ionic-hello-world@
6 silly lifecycle ionic-hello-world@~premeteor-client:bundle: no script for premeteor-client:bundle, continuing
7 info lifecycle ionic-hello-world@~meteor-client:bundle: ionic-hello-world@
8 verbose lifecycle ionic-hello-world@~meteor-client:bundle: unsafe-perm in lifecycle true
9 verbose lifecycle ionic-hello-world@~meteor-client:bundle: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/home/niko/WebstormProjects/whatsapp_2/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/android-sdk/platform-tools:/usr/lib/jvm/$
10 verbose lifecycle ionic-hello-world@~meteor-client:bundle: CWD: /home/niko/WebstormProjects/whatsapp_2
11 silly lifecycle ionic-hello-world@~meteor-client:bundle: Args: [ '-c',
11 silly lifecycle   'meteor-client bundle -s api -c meteor-client.config.json' ]
12 silly lifecycle ionic-hello-world@~meteor-client:bundle: Returned: code: 1  signal: null
13 info lifecycle ionic-hello-world@~meteor-client:bundle: Failed to exec meteor-client:bundle script
14 verbose stack Error: ionic-hello-world@ meteor-client:bundle: `meteor-client bundle -s api -c meteor-client.config.json`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:194:7)
14 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:194:7)
14 verbose stack     at maybeClose (internal/child_process.js:899:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid ionic-hello-world@
16 verbose cwd /home/niko/WebstormProjects/whatsapp_2
17 verbose Linux 4.10.10-1-ARCH
18 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "meteor-client:bundle"
19 verbose node v7.7.3
20 verbose npm  v4.5.0
21 error code ELIFECYCLE
22 error errno 1
23 error ionic-hello-world@ meteor-client:bundle: `meteor-client bundle -s api -c meteor-client.config.json`
23 error Exit status 1
24 error Failed at the ionic-hello-world@ meteor-client:bundle script 'meteor-client bundle -s api -c meteor-client.config.json'.
24 error Make sure you have the latest version of node.js and npm installed.
24 error If you do, this is most likely a problem with the ionic-hello-world package,
24 error not with npm itself.
24 error Tell the author that this fails on your system:
24 error     meteor-client bundle -s api -c meteor-client.config.json
24 error You can get information on how to open an issue for this project with:
24 error     npm bugs ionic-hello-world
24 error Or if that isn't available, you can get their info via:
24 error     npm owner ls ionic-hello-world
24 error There is likely additional logging output above.
25 verbose exit [ 1, true ]

I'm using meteor-client-bunlde-0.2.0 Omitting the config file changes nothing. It used to work previously.

DAB0mB commented 7 years ago

@darkbasic Can you tell me what happens if you append --packs-dir ./packages to your command? I know what could be the source for the problem I'm just trying to find it in the most accurate way

darkbasic commented 7 years ago
$ meteor-client bundle -s api --packs-dir ./packages                             
/home/niko/.meteor/packages/meteor-tool/.1.4.4_1.1t9hste++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:190
      throw error;
      ^

SyntaxError: Unexpected token 
    at Object.parse (native)
    at /tools/packaging/catalog/catalog-remote.js:873:19
    at Array.map (native)
    at Function._.map._.collect (/home/niko/.meteor/packages/meteor-tool/.1.4.4_1.1t9hste++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:97:56)
    at [object Object]._.extend._contentQuery (/tools/packaging/catalog/catalog-remote.js:872:14)
    at [object Object]._.extend.getSortedVersionRecords (/tools/packaging/catalog/catalog-remote.js:568:31)
    at [object Object]._.extend._returnFirst (/tools/packaging/catalog/catalog.js:190:12)
    at [object Object]._.extend.getSortedVersionRecords (/tools/packaging/catalog/catalog.js:202:17)
    at [object Object].CS.CatalogLoader._getSortedVersionRecords (packages/constraint-solver.js:333:20)
    at [object Object].CS.CatalogLoader.loadAllVersions (packages/constraint-solver.js:362:26)
    at [object Object].CS.CatalogLoader.loadAllVersionsRecursive (packages/constraint-solver.js:395:10)
    at [object Object].CS.Input.loadFromCatalog (packages/constraint-solver.js:562:17)
    at packages/constraint-solver.js:2217:15
    at Function.time (/tools/tool-env/profile.js:305:10)
    at [object Object].CS.PackagesResolver.resolve (packages/constraint-solver.js:2214:13)
    at /tools/project-context.js:533:35
    at Function.time (/tools/tool-env/profile.js:305:10)
    at /tools/project-context.js:529:19
    at /tools/utils/buildmessage.js:359:18
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:352:34
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:350:23
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at Object.enterJob (/tools/utils/buildmessage.js:324:26)
    at /tools/project-context.js:501:20
    at /tools/packaging/catalog/catalog.js:100:5
    at /tools/utils/buildmessage.js:271:13
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:264:29
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:262:18
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:253:23
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at Object.capture (/tools/utils/buildmessage.js:252:19)
    at Object.catalog.runAndRetryWithRefreshIfHelpful (/tools/packaging/catalog/catalog.js:99:31)
    at ProjectContext._resolveConstraints (/tools/project-context.js:500:13)
    at /tools/project-context.js:283:9
    at /tools/utils/buildmessage.js:359:18
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:352:34
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:350:23
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at Object.enterJob (/tools/utils/buildmessage.js:324:26)
    at ProjectContext._.extend._completeStagesThrough (/tools/project-context.js:273:18)
    at /tools/project-context.js:265:12
    at Function.run (/tools/tool-env/profile.js:490:12)
    at ProjectContext._.extend.prepareProjectForBuild (/tools/project-context.js:264:13)
    at /tools/cli/commands.js:741:20
    at /tools/utils/buildmessage.js:271:13
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:264:29
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:262:18
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:253:23
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at Object.capture (/tools/utils/buildmessage.js:252:19)
    at Object.main.captureAndExit (/tools/cli/main.js:273:29)
    at Command.func (/tools/cli/commands.js:715:8)
    at /tools/cli/main.js:1483:23
/usr/lib/node_modules/meteor-client-bundler/node_modules/execa/index.js:277
                throw (result.error || new Error(result.stderr === '' ? result.stdout : result.stderr));
                ^

Error: null
    at Function.module.exports.sync (/usr/lib/node_modules/meteor-client-bundler/node_modules/execa/index.js:277:26)
    at Object.bundle (/usr/lib/node_modules/meteor-client-bundler/lib/bundler.js:35:9)
    at Command.<anonymous> (/usr/lib/node_modules/meteor-client-bundler/cli:42:13)
    at Command.listener (/usr/lib/node_modules/meteor-client-bundler/node_modules/commander/index.js:301:8)
    at emitTwo (events.js:106:13)
    at Command.emit (events.js:194:7)
    at Command.parseArgs (/usr/lib/node_modules/meteor-client-bundler/node_modules/commander/index.js:615:12)
    at Command.parse (/usr/lib/node_modules/meteor-client-bundler/node_modules/commander/index.js:458:21)
    at Object.<anonymous> (/usr/lib/node_modules/meteor-client-bundler/cli:50:9)
    at Module._compile (module.js:571:32)
darkbasic commented 7 years ago

I know what could be the source for the problem

Do you have a workaround I can use in the meantime? I'm using the whatsapp tutorial as a testbed but I have a real world app to write and I cannot halt the development :)

darkbasic commented 7 years ago

It seems the problem is not limited to meteor-package-bundler:

$ meteor add jalik:ufs
/home/niko/.meteor/packages/meteor-tool/.1.4.4_1.1t9hste++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/isopackets/ddp/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:190
      throw error;
      ^

SyntaxError: Unexpected token 
    at Object.parse (native)
    at /tools/packaging/catalog/catalog-remote.js:873:19
    at Array.map (native)
    at Function._.map._.collect (/home/niko/.meteor/packages/meteor-tool/.1.4.4_1.1t9hste++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:97:56)
    at [object Object]._.extend._contentQuery (/tools/packaging/catalog/catalog-remote.js:872:14)
    at [object Object]._.extend.getSortedVersionRecords (/tools/packaging/catalog/catalog-remote.js:568:31)
    at [object Object]._.extend._returnFirst (/tools/packaging/catalog/catalog.js:190:12)
    at [object Object]._.extend.getSortedVersionRecords (/tools/packaging/catalog/catalog.js:202:17)
    at [object Object].CS.CatalogLoader._getSortedVersionRecords (packages/constraint-solver.js:333:20)
    at [object Object].CS.CatalogLoader.loadAllVersions (packages/constraint-solver.js:362:26)
    at [object Object].CS.CatalogLoader.loadAllVersionsRecursive (packages/constraint-solver.js:395:10)
    at [object Object].CS.Input.loadFromCatalog (packages/constraint-solver.js:562:17)
    at packages/constraint-solver.js:2217:15
    at Function.time (/tools/tool-env/profile.js:305:10)
    at [object Object].CS.PackagesResolver.resolve (packages/constraint-solver.js:2214:13)
    at /tools/project-context.js:533:35
    at Function.time (/tools/tool-env/profile.js:305:10)
    at /tools/project-context.js:529:19
    at /tools/utils/buildmessage.js:359:18
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:352:34
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:350:23
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at Object.enterJob (/tools/utils/buildmessage.js:324:26)
    at /tools/project-context.js:501:20
    at /tools/packaging/catalog/catalog.js:100:5
    at /tools/utils/buildmessage.js:271:13
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:264:29
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:262:18
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:253:23
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at Object.capture (/tools/utils/buildmessage.js:252:19)
    at Object.catalog.runAndRetryWithRefreshIfHelpful (/tools/packaging/catalog/catalog.js:99:31)
    at ProjectContext._resolveConstraints (/tools/project-context.js:500:13)
    at /tools/project-context.js:283:9
    at /tools/utils/buildmessage.js:359:18
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:352:34
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:350:23
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at Object.enterJob (/tools/utils/buildmessage.js:324:26)
    at ProjectContext._.extend._completeStagesThrough (/tools/project-context.js:273:18)
    at /tools/project-context.js:265:12
    at Function.run (/tools/tool-env/profile.js:490:12)
    at ProjectContext._.extend.prepareProjectForBuild (/tools/project-context.js:264:13)
    at /tools/cli/commands-packages.js:2071:20
    at /tools/utils/buildmessage.js:271:13
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:264:29
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:262:18
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:253:23
    at [object Object]._.extend.withValue (/tools/utils/fiber-helpers.js:89:14)
    at Object.capture (/tools/utils/buildmessage.js:252:19)
    at Command.func (/tools/cli/commands-packages.js:2070:27)
    at /tools/cli/main.js:1483:23
darkbasic commented 7 years ago

Deleting ~/.meteor and reinstalling Meteor solved my problem. I cal still access the old copy of .meteor through btrfs snapshots if you want me to.

DAB0mB commented 7 years ago

@darkbasic No that's good enough for now. I'm closing this issue then :-)