Hi, i just updated my project from version 1.8 to 2.5.2 and now when i try to run it i see this error :
SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at /Users/grzegorzpociejewski/.meteor/packages/meteor-tool/.2.5.2.rv2ntq.lmcrc++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/tools/fs/tools/fs/optimistic.ts:321:17
at wrap.makeCacheKey (/Users/grzegorzpociejewski/.meteor/packages/meteor-tool/.2.5.2.rv2ntq.lmcrc++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/tools/fs/tools/fs/optimistic.ts:36:15)
at recomputeNewValue (/Users/grzegorzpociejewski/.meteor/packages/meteor-tool/.2.5.2.rv2ntq.lmcrc++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/optimism/src/entry.ts:198:31)
at Slot.withValue (/Users/grzegorzpociejewski/.meteor/packages/meteor-tool/.2.5.2.rv2ntq.lmcrc++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/@wry/context/lib/context.esm.js:69:29)
at reallyRecompute (/Users/grzegorzpociejewski/.meteor/packages/meteor-tool/.2.5.2.rv2ntq.lmcrc++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/optimism/src/entry.ts:181:19)
at Entry.recompute (/Users/grzegorzpociejewski/.meteor/packages/meteor-tool/.2.5.2.rv2ntq.lmcrc++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/optimism/src/entry.ts:91:9)
at optimistic (/Users/grzegorzpociejewski/.meteor/packages/meteor-tool/.2.5.2.rv2ntq.lmcrc++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/optimism/src/index.ts:150:25)
at /Users/grzegorzpociejewski/.meteor/packages/meteor-tool/.2.5.2.rv2ntq.lmcrc++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/tools/fs/tools/fs/optimistic.ts:366:19
at recomputeNewValue (/Users/grzegorzpociejewski/.meteor/packages/meteor-tool/.2.5.2.rv2ntq.lmcrc++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/optimism/src/entry.ts:198:31)
at Slot.withValue (/Users/grzegorzpociejewski/.meteor/packages/meteor-tool/.2.5.2.rv2ntq.lmcrc++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/@wry/context/lib/context.esm.js:69:29)
at reallyRecompute (/Users/grzegorzpociejewski/.meteor/packages/meteor-tool/.2.5.2.rv2ntq.lmcrc++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/optimism/src/entry.ts:181:19)
at Entry.recompute (/Users/grzegorzpociejewski/.meteor/packages/meteor-tool/.2.5.2.rv2ntq.lmcrc++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/optimism/src/entry.ts:91:9)
at optimistic (/Users/grzegorzpociejewski/.meteor/packages/meteor-tool/.2.5.2.rv2ntq.lmcrc++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/optimism/src/index.ts:150:25)
at find (/tools/isobuild/package-source.js:1344:30)
at /tools/isobuild/package-source.js:1400:27
at Array.forEach (<anonymous>)
at find (/tools/isobuild/package-source.js:1379:22)
at /tools/isobuild/package-source.js:1400:27
at Array.forEach (<anonymous>)
at find (/tools/isobuild/package-source.js:1379:22)
at /tools/isobuild/package-source.js:1400:27
at Array.forEach (<anonymous>)
at find (/tools/isobuild/package-source.js:1379:22)
at /tools/isobuild/package-source.js:1400:27
at Array.forEach (<anonymous>)
at find (/tools/isobuild/package-source.js:1379:22)
at find (/tools/isobuild/package-source.js:1411:25)
at /tools/isobuild/package-source.js:1423:34
at Object.withCache (/Users/grzegorzpociejewski/.meteor/packages/meteor-tool/.2.5.2.rv2ntq.lmcrc++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/tools/fs/tools/fs/files.ts:1662:18)
at PackageSource._findSources (/tools/isobuild/package-source.js:1423:18)
at SourceArch.getFiles (/tools/isobuild/package-source.js:965:32)
at /tools/isobuild/compiler.js:406:23
at /tools/isobuild/compiler.js:186:28
at Object.withCache (/Users/grzegorzpociejewski/.meteor/packages/meteor-tool/.2.5.2.rv2ntq.lmcrc++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/tools/fs/tools/fs/files.ts:1662:18)
at /tools/isobuild/compiler.js:185:11
at Function.each (/Users/grzegorzpociejewski/.meteor/packages/meteor-tool/.2.5.2.rv2ntq.lmcrc++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/underscore/underscore-node-f-pre.js:1316:7)
at Object.compile (/tools/isobuild/compiler.js:180:5)
at /tools/isobuild/bundler.js:3295:24
at Object.capture (/tools/utils/buildmessage.js:283:5)
at bundle (/tools/isobuild/bundler.js:3241:31)
at /tools/isobuild/bundler.js:3184:32
at Slot.withValue (/Users/grzegorzpociejewski/.meteor/packages/meteor-tool/.2.5.2.rv2ntq.lmcrc++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/@wry/context/lib/context.esm.js:69:29)
at Object.withCache (/Users/grzegorzpociejewski/.meteor/packages/meteor-tool/.2.5.2.rv2ntq.lmcrc++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/tools/fs/tools/fs/files.ts:1662:39)
at Object.bundle (/tools/isobuild/bundler.js:3184:16)
at /tools/runners/run-app.js:581:24
at Function.run (/Users/grzegorzpociejewski/.meteor/packages/meteor-tool/.2.5.2.rv2ntq.lmcrc++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/tools/tool-env/tools/tool-env/profile.ts:289:14)
at bundleApp (/tools/runners/run-app.js:580:34)
at AppRunner._runOnce (/tools/runners/run-app.js:627:35)
at AppRunner._fiber (/tools/runners/run-app.js:949:28)
at /tools/runners/run-app.js:410:12
I have got the same issue with meteor 2.5.2 with Node 14.18.2 or Node 14.17.0.
It is weird because it works locally but not in my pipeline
Hope we will have a fix soon
The error :
/home/vsts/.meteor/packages/meteor-tool/.2.5.2.tbofkq.6tw2n++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:218
throw error;
^
SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at /home/vsts/.meteor/packages/meteor-tool/.2.5.2.tbofkq.6tw2n++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/fs/tools/fs/optimistic.ts:321:17
at wrap.makeCacheKey (/home/vsts/.meteor/packages/meteor-tool/.2.5.2.tbofkq.6tw2n++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/fs/tools/fs/optimistic.ts:36:15)
at recomputeNewValue (/home/vsts/.meteor/packages/meteor-tool/.2.5.2.tbofkq.6tw2n++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/optimism/src/entry.ts:198:31)
at Slot.withValue (/home/vsts/.meteor/packages/meteor-tool/.2.5.2.tbofkq.6tw2n++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/@wry/context/lib/context.esm.js:69:29)
at reallyRecompute (/home/vsts/.meteor/packages/meteor-tool/.2.5.2.tbofkq.6tw2n++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/optimism/src/entry.ts:181:19)
at Entry.recompute (/home/vsts/.meteor/packages/meteor-tool/.2.5.2.tbofkq.6tw2n++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/optimism/src/entry.ts:91:9)
at optimistic (/home/vsts/.meteor/packages/meteor-tool/.2.5.2.tbofkq.6tw2n++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/optimism/src/index.ts:150:25)
at /home/vsts/.meteor/packages/meteor-tool/.2.5.2.tbofkq.6tw2n++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/fs/tools/fs/optimistic.ts:366:19
at recomputeNewValue (/home/vsts/.meteor/packages/meteor-tool/.2.5.2.tbofkq.6tw2n++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/optimism/src/entry.ts:198:31)
at Slot.withValue (/home/vsts/.meteor/packages/meteor-tool/.2.5.2.tbofkq.6tw2n++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/@wry/context/lib/context.esm.js:69:29)
at reallyRecompute (/home/vsts/.meteor/packages/meteor-tool/.2.5.2.tbofkq.6tw2n++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/optimism/src/entry.ts:181:19)
at Entry.recompute (/home/vsts/.meteor/packages/meteor-tool/.2.5.2.tbofkq.6tw2n++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/optimism/src/entry.ts:91:9)
at optimistic (/home/vsts/.meteor/packages/meteor-tool/.2.5.2.tbofkq.6tw2n++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/optimism/src/index.ts:150:25)
at find (/tools/isobuild/package-source.js:1344:30)
at /tools/isobuild/package-source.js:1400:27
at Array.forEach (<anonymous>)
at find (/tools/isobuild/package-source.js:1379:22)
at /tools/isobuild/package-source.js:1400:27
at Array.forEach (<anonymous>)
at find (/tools/isobuild/package-source.js:1379:22)
at /tools/isobuild/package-source.js:1400:27
And realised that there is malformed package.json file in resolve - npm. However this malformed .json file is there intentionally for proper testing. Once i remove this package from dependency it started working so it seems that it is problem with meteor builder. I had no time for deeper investigation so far.
We are having the same error but without updating a 2.2 install of meteor. We didn’t change anything special but new builds fail. Can we solve it without updating ?
No, we’re finally doing the update and it seems to work, my worry/concern is more how a new version of Meteor causes problem with old versions to be built. We were on 2.2 corrected a small bug in our frontend code, and trying to rebuild 2.2 caused this error on build (while while working locally).
I guess am just missing a piece of the puzzle here
This problem was caused by a malformed package.json in your NPM dependencies, probably resolve module. Meteor reads all the package.json in your app dependencies.
What we are doing in Meteor is to try to prevent this error starting from version 2.5.3. Or at least reporting which package.json is invalid and throwing exception.