yarle: running as specified in README uses 100% cpu does nothing

Ubuntu 20.10

apt install -y node npm
npx -p yarle-evernote-to-md@latest yarle --configFile config.json

no tty or files output. htop shows one node process using 100% forever.

npx -p yarle-evernote-to-md@latest yarle

no tty or files output. htop shows one node process using 100% forever.

Tried docker:

docker run -it --rm -v $PWD:/mnt node bash

root@273d159ee63d:/mnt# npx -p yarle-evernote-to-md@latest yarle --configFile ./config.json
Need to install the following packages:
  yarle-evernote-to-md@latest
Ok to proceed? (y) y
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated node-pre-gyp@0.17.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
sh: 1: yarle: Permission denied
npm notice
npm notice New patch version of npm available! 7.6.0 -> 7.6.3
npm notice Changelog: https://github.com/npm/cli/releases/tag/v7.6.3
npm notice Run npm install -g npm@7.6.3 to update!
npm notice
root@5ca5ffe17afb:/mnt# npm install -g npm@7.6.3

changed 14 packages, and audited 254 packages in 2s

11 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
npm notice
npm notice New patch version of npm available! 7.6.0 -> 7.6.3
npm notice Changelog: https://github.com/npm/cli/releases/tag/v7.6.3
npm notice Run npm install -g npm@7.6.3 to update!
npm notice
root@5ca5ffe17afb:/mnt# npx -p yarle-evernote-to-md@latest yarle --configFile ./config.json
sh: 1: yarle: Permission denied

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (9 by maintainers)

Most upvoted comments

Ok. I have learned way more about npm than I ever set out for.

But after changing ~/node_modules/.bin/jarle to just:

/usr/bin/node --max-old-space-size=1024 ~/node_modules/yarle-evernote-to-md/dist/dropTheRope.js $@

It works.

Finished conversion: Wed Mar 17 2021 19:58:42 GMT+0000 (Greenwich Mean Time)

Notes processed: 447

==========================
Conversion finished: 447 succeeded, 0 skipped, 0 failed. Total notes: 447

There is something in the startup script that npm installs that causes the hang.

EDIT: Also if I check out the code and npm build && npm start it runs fine from the git clone directory.

@sedlund , Thanks for the dockerfile and start script, I was able to reproduce the issue as well. What I found is this: my start script is the following:

#!/usr/bin/env node --max-old-space-size=1024
/* istanbul ignore file */
// tslint:disable:no-console

import * as dropTheRopeRunner from './dropTheRopeRunner';

dropTheRopeRunner.run({});
// tslint:enable:no-console

and if I remove the space-size setting console parameter after node, its runs as expected. If it’s there, it hangs. I’ll investigate the possible solutions further.

Thank you very much for your effort, you helped a lot, it would not have been done without you.