Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails due to parse error in JSV/package.json #236

Closed
arky opened this issue Jul 16, 2019 · 2 comments
Closed

Build fails due to parse error in JSV/package.json #236

arky opened this issue Jul 16, 2019 · 2 comments

Comments

@arky
Copy link
Contributor

arky commented Jul 16, 2019

Describe the bug
When building mapeo-desktop using 'yarn run dist' the builds fails with following error.

Upstream: Bug Report garycourt/JSV#94
Upstream: Workaround zaach/jsonlint#118

node_modules.Dependency.Dependencies: ReadMapCB: expect { or n, but found [, error found in #10 byte of ...|ncies" : [],
	"main|..., bigger context ...|/garycourt/JSV.git"
		}
	],
	"dependencies" : [],
	"main" : "lib/jsv.js",
	"keywords" : ["json"|...
Error reading package.json: /media/arky/DevDrive/Code/Mapeo/mapeo-desktop/node_modules/JSV/package.json

**Work-Around: **

Change "dependencies: {}" in node_modules/JSV/package.json

Since the upstream package is not-maintained anymore we could either drop the package or use npm patch-package to ship a local fix.

Additional context
Add any other context about the problem here.

`$ electron-builder --publish=onTagOrDraft
• electron-builder version=20.44.4
• loaded configuration file=package.json ("build" field)
• writing effective config file=dist/builder-effective-config.yaml
• rebuilding native production dependencies platform=linux arch=x64
• rebuilding native dependency name=fd-lock
• rebuilding native dependency name=leveldown
• rebuilding native dependency name=utp-native
• rebuilding native dependency name=sodium-native
• rebuilding native dependency name=leveldown
• rebuilding native dependency name=leveldown
• packaging platform=linux arch=x64 electron=2.0.18 appOutDir=dist/linux-unpacked
⨯ node_modules.Dependency.Dependencies: ReadMapCB: expect { or n, but found [, error found in #10 byte of ...|ncies" : [],
"main|..., bigger context ...|/garycourt/JSV.git"
}
],
"dependencies" : [],
"main" : "lib/jsv.js",
"keywords" : ["json"|...
Error reading package.json: /media/arky/DevDrive/Code/Mapeo/mapeo-desktop/node_modules/JSV/package.json

Error: /media/arky/DevDrive/Code/Mapeo/mapeo-desktop/node_modules/app-builder-bin/linux/x64/app-builder exited with code 1
at ChildProcess.childProcess.once.code (/media/arky/DevDrive/Code/Mapeo/mapeo-desktop/node_modules/builder-util/src/util.ts:244:14)
at Object.onceWrapper (events.js:317:30)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:915:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
From previous event:
at _computeNodeModuleFileSets (/media/arky/DevDrive/Code/Mapeo/mapeo-desktop/node_modules/app-builder-lib/out/util/appFileCopier.js:395:37)
at computeNodeModuleFileSets (/media/arky/DevDrive/Code/Mapeo/mapeo-desktop/node_modules/app-builder-lib/out/util/appFileCopier.js:338:37)
at /media/arky/DevDrive/Code/Mapeo/mapeo-desktop/node_modules/app-builder-lib/src/platformPackager.ts:286:42
at Generator.next ()
From previous event:
at /media/arky/DevDrive/Code/Mapeo/mapeo-desktop/node_modules/app-builder-lib/src/platformPackager.ts:282:14
From previous event:
at _computeFileSets (/media/arky/DevDrive/Code/Mapeo/mapeo-desktop/node_modules/app-builder-lib/src/platformPackager.ts:283:10)
at LinuxPackager.copyAppFiles (/media/arky/DevDrive/Code/Mapeo/mapeo-desktop/node_modules/app-builder-lib/src/platformPackager.ts:320:27)
at /media/arky/DevDrive/Code/Mapeo/mapeo-desktop/node_modules/app-builder-lib/src/platformPackager.ts:214:10
at Generator.next ()
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
From previous event:
at LinuxPackager.doPack (/media/arky/DevDrive/Code/Mapeo/mapeo-desktop/node_modules/app-builder-lib/src/platformPackager.ts:167:165)
at /media/arky/DevDrive/Code/Mapeo/mapeo-desktop/node_modules/app-builder-lib/src/platformPackager.ts:113:16
at Generator.next ()
From previous event:
at LinuxPackager.pack (/media/arky/DevDrive/Code/Mapeo/mapeo-desktop/node_modules/app-builder-lib/src/platformPackager.ts:111:95)
at /media/arky/DevDrive/Code/Mapeo/mapeo-desktop/node_modules/app-builder-lib/src/packager.ts:430:24
at Generator.next ()
at xfs.stat (/media/arky/DevDrive/Code/Mapeo/mapeo-desktop/node_modules/fs-extra-p/node_modules/fs-extra/lib/mkdirs/mkdirs.js:56:16)
at callback (/media/arky/DevDrive/Code/Mapeo/mapeo-desktop/node_modules/graceful-fs/polyfills.js:289:20)
at FSReqWrap.oncomplete (fs.js:153:5)
From previous event:
at Packager.doBuild (/media/arky/DevDrive/Code/Mapeo/mapeo-desktop/node_modules/app-builder-lib/src/packager.ts:396:24)
at /media/arky/DevDrive/Code/Mapeo/mapeo-desktop/node_modules/app-builder-lib/src/packager.ts:366:57
at Generator.next ()
at /media/arky/DevDrive/Code/Mapeo/mapeo-desktop/node_modules/graceful-fs/graceful-fs.js:111:16
at /media/arky/DevDrive/Code/Mapeo/mapeo-desktop/node_modules/graceful-fs/graceful-fs.js:45:10
at FSReqWrap.oncomplete (fs.js:135:15)
From previous event:
at Packager._build (/media/arky/DevDrive/Code/Mapeo/mapeo-desktop/node_modules/app-builder-lib/src/packager.ts:335:133)
at /media/arky/DevDrive/Code/Mapeo/mapeo-desktop/node_modules/app-builder-lib/src/packager.ts:331:23
at Generator.next ()
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
From previous event:
at Packager.build (/media/arky/DevDrive/Code/Mapeo/mapeo-desktop/node_modules/app-builder-lib/src/packager.ts:288:14)
at build (/media/arky/DevDrive/Code/Mapeo/mapeo-desktop/node_modules/app-builder-lib/src/index.ts:59:28)
at build (/media/arky/DevDrive/Code/Mapeo/mapeo-desktop/node_modules/electron-builder/src/builder.ts:228:10)
at then (/media/arky/DevDrive/Code/Mapeo/mapeo-desktop/node_modules/electron-builder/src/cli/cli.ts:49:19)
at
error Command failed with exit code 1.
`

@arky arky changed the title Build Fails due to parse error JSV/package.json Build fails due to parse error JSV/package.json Jul 16, 2019
@arky arky changed the title Build fails due to parse error JSV/package.json Build fails due to parse error in JSV/package.json Jul 16, 2019
@arky
Copy link
Contributor Author

arky commented Aug 13, 2019

Fixed in
digidem/osm-p2p-geojson@88a2eec

Thank you @noffle @gmaclennan

@arky arky closed this as completed Aug 13, 2019
@1AoB
Copy link

1AoB commented Aug 7, 2024

⨯ node_modules.Dependency.Dependencies: ReadMapCB: expect { or n, but found [, error found in #10 byte of ...|ncies" : [],
"main|..., bigger context ...|/garycourt/JSV.git"
}
],
"dependencies" : [],
"main" : "lib/jsv.js",
"keywords" : ["json"|...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants