joemccann / dillinger

The last Markdown editor, ever.
https://dillinger.io
MIT License
7.9k stars 1.1k forks source link

Documentation/Installation Issues: Node Version #848

Open DLvalentine opened 1 year ago

DLvalentine commented 1 year ago

The current documentation in the README claims that Node 10+ will work.

I'm using Node 16+ currently, and npm i will fail on a fresh clone of the repo, and I believe it is because of the version of node-sass being used, but that's just a hunch based on some output where gyp was trying to do something with python2. I tried to work around it, but didn't make much progress. There were a few StackOverflow topics, though, that mapped Node versions to versions of node-sass, and that confirmed my suspicion that it was the Node version that I was using that was my issue with npm i.

After installing nvm and installing the last release of Node 10, npm i also failed because of the usage of optional chaining in the repo, which was first supported in Node 14, IIRC. I was able to get dillinger to succeed with npm i with Node 14.21.1

As noted in #839 there are some dependencies that need upgrading, it might be worth mentioning this along with a range of working Node versions in the README.

I'd be happy to go over the README and note this, as well as add any clarity or changes as needed in a PR, if that's alright. :) I just discovered dillinger today and plan to use it in my daily workflow and contribute to it!

corneliusroemer commented 1 year ago

Came here to open this. Can't build it either. It complains about python2 variable not being set. It really seems to require Python 2 based on this error:

npm ERR! gyp verb `which` succeeded python /opt/homebrew/Caskroom/miniforge/base/bin/python
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: Command failed: /opt/homebrew/Caskroom/miniforge/base/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack   File "<string>", line 1
npm ERR! gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
npm ERR! gyp ERR! stack SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
npm ERR! gyp ERR! stack 
npm ERR! gyp ERR! stack     at ChildProcess.exithandler (node:child_process:419:12)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:511:28)
npm ERR! gyp ERR! stack     at maybeClose (node:internal/child_process:1098:16)
npm ERR! gyp ERR! stack     at Socket.<anonymous> (node:internal/child_process:456:11)
npm ERR! gyp ERR! stack     at Socket.emit (node:events:511:28)
npm ERR! gyp ERR! stack     at Pipe.<anonymous> (node:net:335:12)
npm ERR! gyp ERR! System Darwin 22.4.0
npm ERR! gyp ERR! command "/opt/homebrew/Cellar/node/20.1.0/bin/node" "/Users/corneliusromer/code/dillinger/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /Users/corneliusromer/code/dillinger/node_modules/node-sass
npm ERR! gyp ERR! node -v v20.1.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok 
npm ERR! Build failed with error code: 1
masoncfrancis commented 5 months ago

Came here to make this issue as well. Still experiencing install issues with fresh clone

corneliusroemer commented 5 months ago

Known issue but this repo is no longer actively maintained, see https://github.com/joemccann/dillinger/issues/853