[Pkg-javascript-devel] twemoji: yarnpkg/uglifyjs fails?
Pirate Praveen
praveen at onenetbeyond.org
Sat Oct 3 08:25:38 BST 2020
On 2020, ഒക്ടോബർ 3 12:52:54 AM IST, Felix Natter <fnatter at gmx.net> wrote:
>hello Debian-js,
>
>Since, unfortunately, upstream has no build instructions,
>I was advised to use "scripts/build.js" for building twemoji.js
>(command ./scripts/build.js from package.json):
>
>override_dh_auto_build:
> ./scripts/build.js
>
>createTwemoji() in build.js creates dist/twemoji.js successfully.
>Then, scripts/create-dist is called from build.js and crashes in
>https://salsa.debian.org/js-team/node-twemoji/-/blob/master/scripts/create-dist#L53
>when trying to open dist/twemoji.tmp.js:
>
>Error: ENOENT: no such file or directory, open '/home/felix/twemoji-stable/node-twemoji/dist/twemoji.tmp.js'
> at Object.openSync (fs.js:462:3)
> at Object.readFileSync (fs.js:364:35)
> at Object.<anonymous> (/home/felix/twemoji-stable/node-twemoji/scripts/create-dist:53:29)
> at Module._compile (internal/modules/cjs/loader.js:1137:30)
> at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
> at Module.load (internal/modules/cjs/loader.js:985:32)
> at Function.Module._load (internal/modules/cjs/loader.js:878:14)
> at Module.require (internal/modules/cjs/loader.js:1025:19)
> at require (internal/modules/cjs/helpers.js:72:18)
> at Object.<anonymous> (/home/felix/twemoji-stable/node-twemoji/scripts/build.js:609:1) {
>
>It looks like twemoji.tmp.js is created in this block before line 53 [1]:
>
>spawnSync(
> 'yarnpkg',
> [
> 'uglifyjs',
> '--verbose',
> distFile('twemoji.js'),
> '-o',
> distFile('twemoji.tmp.js')
> ]
>);
>
>The packages uglifyjs and yarnpkg are installed. I tried to mimic the
>command, and I get:
>
>$ ~/twemoji-stable/node-twemoji/dist$ yarnpkg uglifyjs twemoji.js -o twemoji.tmp.js
>yarn run v1.22.4
>error Command "uglifyjs" not found.
>info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
>
>Do you have an idea what might go wrong?
Just run uglifyjs directly. I don't think you need yarnpkg here.
>[1]https://salsa.debian.org/js-team/node-twemoji/-/blob/master/scripts/create-dist#L41
>
>Many Thanks and Best Regards,
>Felix
>--
>Felix Natter
>
>
>--
>Pkg-javascript-devel mailing list
>Pkg-javascript-devel at alioth-lists.debian.net
>https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
More information about the Pkg-javascript-devel
mailing list