yarle
yarle copied to clipboard
Can't install yarle
Sorry to bother you but I just wanted to let you know I couldn't install execute the npx command in the readme.md.
npx -p yarle-evernote-to-md@latest yarle --include-metadata --configFile ./yarle-config.json
I also tried npm install yarle-evernote-to-md and it gives me the following errors:
$ npm install yarle-evernote-to-md
up to date, audited 629 packages in 2s
56 packages are looking for funding
run `npm fund` for details
3 high severity vulnerabilities
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
I was able to use the binary for MacOS, but I was hoping to use the command line instead. I tried it with several different versions of node v17.9.0, v16.14.2, etc.
I did try to run npm audit fix and npm audit fix --force, but it didn't seem to make a difference.
Do you any ideas of what I'm doing wrong, or is NPM preventing me from install due the security vulnerabilities?
Yihaa, thank you for reporting me this issue and to let me improve Yarle!
Hi @gmclelland ,
What is the output of the npx command? And which OS do you use?
I use MacOS High Sierra.
$ npx -p yarle-evernote-to-md@latest yarle --include-metadata --configFile ./yarle-config.json
Need to install the following packages:
yarle-evernote-to-md@latest
Ok to proceed? (y) y
npm WARN deprecated [email protected]: 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 [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: "Please update to latest v2.3 or v2.2"
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: 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 [email protected]: 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
Hi @gmclelland , I don't see any relevant errors here, these are just warnings, what happens then?
That's what is confusing, nothing happens. No notes are converted and placed into the output directories. It just awaits for the next command at the command prompt $.
I ran the npx command from this directory: /Users/glenn/Downloads/Evernote/
Here is my yarle-config.json that sits in the same directory as my .enex files
{
"enexSources": [
"/Users/glenn/Downloads/Evernote/Development.enex",
"/Users/glenn/Downloads/Evernote/Information Technology.enex"
],
"templateFile": "./noteTemplate.tmpl",
"outputDir": "/Users/glenn/Dropbox/Apps/Obsidian/EvernoteExport",
"isZettelkastenNeeded": false,
"plainTextNotesOnly": false,
"skipWebClips": false,
"useHashTags": true,
"outputFormat": "ObsidianMD",
"urlEncodeFileNamesAndLinks": true,
"sanitizeResourceNameSpaces": true,
"replacementChar": "-",
"pathSeparator": "/",
"skipEnexFileNameFromOutputPath": true,
"skipCreationTime": true,
"skipUpdateTime": true,
"skipSourceUrl": false,
"skipTags": false,
"monospaceIsCodeBlock": false,
"keepMDCharactersOfENNotes": false,
"keepOriginalAmountOfNewlines": false,
"obsidianSettings": {
"omitLinkDisplayName": false
},
"generateNakedUrls": true,
"addExtensionToInternalLinks": false,
"nestedTags": {
"separatorInEN": "_",
"replaceSeparatorWith": "/",
"replaceSpaceWith": "-"
},
"resourcesDir": "_attachments",
"turndownOptions": {
"headingStyle": "atx",
"bulletListMarker": "-"
},
"dateFormat": "YYYY-MM-DD",
"haveEnexLevelResources": false,
"haveGlobalResources": true,
"logseqSettings":{
"journalNotes": true
}
}
I confirmed that it is valid json.
Ok, now I'm getting somewhere. I saw that I was executing the command from the wrong directory that had been trashed.
Now when I run it from the right directory(/Users/glenn/Downloads/Evernote/), it gives me the following errors:
npx -p yarle-evernote-to-md@latest yarle --include-metadata --configFile ./yarle-config.json
/Users/glenn/node_modules/utimes/src/utimes/index.js:11
throw new Error('Could not find the "utimes" binary, have you run npm install?');
^
Error: Could not find the "utimes" binary, have you run npm install?
at Object.<anonymous> (/Users/glenn/node_modules/utimes/src/utimes/index.js:11:8)
at Module._compile (node:internal/modules/cjs/loader:1099:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:999:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/Users/glenn/node_modules/yarle-evernote-to-md/dist/utils/content-utils.js:9:18)
at Module._compile (node:internal/modules/cjs/loader:1099:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
Node.js v17.9.0
Here's what I tried after it recommended a npm install
$ npm install
up to date, audited 629 packages in 1s
56 packages are looking for funding
run `npm fund` for details
3 high severity vulnerabilities
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
~/Downloads/Evernote
$ npm audit fix
up to date, audited 629 packages in 2s
56 packages are looking for funding
run `npm fund` for details
# npm audit report
marked <4.0.10
Severity: high
Inefficient Regular Expression Complexity in marked - https://github.com/advisories/GHSA-5v2h-r2cx-5xgj
fix available via `npm audit fix --force`
Will install [email protected], which is a breaking change
node_modules/marked
yarle-evernote-to-md >=2.0.0
Depends on vulnerable versions of marked
Depends on vulnerable versions of moment
node_modules/yarle-evernote-to-md
moment <2.29.2
Severity: high
Path Traversal: 'dir/../../filename' in moment.locale - https://github.com/advisories/GHSA-8hfj-j24r-96c4
fix available via `npm audit fix --force`
Will install [email protected], which is a breaking change
node_modules/moment
yarle-evernote-to-md >=2.0.0
Depends on vulnerable versions of marked
Depends on vulnerable versions of moment
node_modules/yarle-evernote-to-md
3 high severity vulnerabilities
To address all issues (including breaking changes), run:
npm audit fix --force
✘ ~/Downloads/Evernote
$ npm audit fix --force
npm WARN using --force Recommended protections disabled.
npm WARN audit Updating yarle-evernote-to-md to 1.2.0,which is a SemVer major change.
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '8.9.4', npm: '5.6.0' },
npm WARN EBADENGINE current: { node: 'v17.9.0', npm: '8.5.5' }
npm WARN EBADENGINE }
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated [email protected]: use String.prototype.padStart()
npm ERR! code 1
npm ERR! path /Users/glenn/node_modules/@ronomon/utimes
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | x64
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration
npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
npm ERR! gyp ERR! find Python checking if "python3" can be used
npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error
npm ERR! gyp ERR! find Python checking if "python" can be used
npm ERR! gyp ERR! find Python - executable path is "/usr/bin/python"
npm ERR! gyp ERR! find Python - version is "2.7.16"
npm ERR! gyp ERR! find Python - version is 2.7.16 - should be >=3.6.0
npm ERR! gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! find Python **********************************************************
npm ERR! gyp ERR! find Python You need to install the latest version of Python.
npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
npm ERR! gyp ERR! find Python you can try one of the following options:
npm ERR! gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
npm ERR! gyp ERR! find Python (accepted by both node-gyp and npm)
npm ERR! gyp ERR! find Python - Set the environment variable PYTHON
npm ERR! gyp ERR! find Python - Set the npm configuration variable python:
npm ERR! gyp ERR! find Python npm config set python "/path/to/pythonexecutable"
npm ERR! gyp ERR! find Python For more information consult the documentation at:
npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
npm ERR! gyp ERR! find Python **********************************************************
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Python installation to use
npm ERR! gyp ERR! stack at PythonFinder.fail (/Users/glenn/.nvm/versions/node/v17.9.0/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:330:47)
npm ERR! gyp ERR! stack at PythonFinder.runChecks (/Users/glenn/.nvm/versions/node/v17.9.0/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:159:21)
npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (/Users/glenn/.nvm/versions/node/v17.9.0/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:266:16)
npm ERR! gyp ERR! stack at PythonFinder.execFileCallback (/Users/glenn/.nvm/versions/node/v17.9.0/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:297:7)
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:390:7)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:527:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1090:16)
npm ERR! gyp ERR! stack at Socket.<anonymous> (node:internal/child_process:449:11)
npm ERR! gyp ERR! stack at Socket.emit (node:events:527:28)
npm ERR! gyp ERR! stack at Pipe.<anonymous> (node:net:715:12)
npm ERR! gyp ERR! System Darwin 17.7.0
npm ERR! gyp ERR! command "/Users/glenn/.nvm/versions/node/v17.9.0/bin/node" "/Users/glenn/.nvm/versions/node/v17.9.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /Users/glenn/node_modules/@ronomon/utimes
npm ERR! gyp ERR! node -v v17.9.0
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/glenn/.npm/_logs/2022-04-13T15_32_10_678Z-debug-0.log
Hmmm... I tried on a brand new mac but get a different error.
╭─ ~/Downloads/Evernote
╰─❯ npx -p yarle-evernote-to-md@latest yarle --configFile ./yarle-config.json --include-metadata
Need to install the following packages:
yarle-evernote-to-md@latest
Ok to proceed? (y) y
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: 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 [email protected]: 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 [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: "Please update to latest v2.3 or v2.2"
npm WARN deprecated [email protected]: 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
logfilepath: /Users/glenn/Library/Application Support/yarle-evernote-to-md/conversion.log
clearing log: /Users/glenn/Library/Application Support/yarle-evernote-to-md/conversion.log
Loading config from /Users/glenn/Downloads/Evernote/./yarle-config.json
node:fs:1406
handleErrorFromBinding(ctx);
^
Error: ENOTDIR: not a directory, scandir '/Users/glenn/Downloads/Evernote/Development.enex'
at Object.readdirSync (node:fs:1406:3)
at Object.run (/Users/glenn/.npm/_npx/106a035a6ccf201d/node_modules/yarle-evernote-to-md/dist/dropTheRopeRunner.js:47:14)
at Object.<anonymous> (/Users/glenn/.npm/_npx/106a035a6ccf201d/node_modules/yarle-evernote-to-md/dist/dropTheRope.js:26:19)
at Module._compile (node:internal/modules/cjs/loader:1099:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
at node:internal/main/run_main_module:17:47 {
errno: -20,
syscall: 'scandir',
code: 'ENOTDIR',
path: '/Users/glenn/Downloads/Evernote/Development.enex'
}
Node.js v17.9.0
I know nodejs is working. I can run the following and it works:
npx cowsay "Hello World"
Is yarle working okay for you?
Got it working!
Looks like it didn't like the following in the config file:
"enexSources": [
"/Users/glenn/Downloads/Evernote/Development.enex",
"/Users/glenn/Downloads/Evernote/Information Technology.enex"
],
I changed it to:
"enexSources": [
"/Users/glenn/Downloads/Evernote/Development.enex"
],
and it started working.
Hi @gmclelland !
By default npx installs everything requied for the application, so you don't have to take care of npm i manually. The problem I think is related to utimes which provides versions precompiled for each OS +version, and it may happen that it misses a compilation for Mac High Sierra. I'll contact its maintainer and ask to do it. the other problem related to the path of the enex folders, and a last one looks like an existing bug about setting multiple paths, which is strange, because the UI uses the same interface and it works properly there. I'll test the issues and will release a fixed version if i found something. Thanks for reporting this issue, and I'm glad you found the way to drop your rope from Evernote! :)