Giter Site home page Giter Site logo

Comments (7)

xylomorph avatar xylomorph commented on May 15, 2024 1

Yes, I will help Eugen!

What regards your question: It seems I have a prebuild version my system (Ubuntu 16.04.2 LTS). npx says

sebastian@sebastian-ThinkPad-X1-Carbon-3rd:~/tmp/can-be-deleted/argdown$  npx [email protected] -f png --density=300 --width=3000 --height=3000  ./farbentest.argdown 
info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.6.1/libvips-8.6.1-linux-x64.tar.gz
prebuild-install info begin Prebuild-install version 2.5.1
prebuild-install info looking for local prebuild @ prebuilds/sharp-v0.20.1-node-v59-linux-x64.tar.gz
prebuild-install info looking for cached prebuild @ /home/sebastian/.npm/_prebuilds/https-github.com-lovell-sharp-releases-download-v0.20.1-sharp-v0.20.1-node-v59-linux-x64.tar.gz
prebuild-install info found cached prebuild 
prebuild-install info unpacking @ /home/sebastian/.npm/_prebuilds/https-github.com-lovell-sharp-releases-download-v0.20.1-sharp-v0.20.1-node-v59-linux-x64.tar.gz
prebuild-install info unpack resolved to /home/sebastian/.npm/_npx/7275/lib/node_modules/argdown-cli/node_modules/sharp/build/Release/sharp.node
prebuild-install info unpack required /home/sebastian/.npm/_npx/7275/lib/node_modules/argdown-cli/node_modules/sharp/build/Release/sharp.node successfully
prebuild-install info install Successfully installed prebuilt binary!

Though, no idea what can be inferred about most Linux users...

from argdown.

christianvoigt avatar christianvoigt commented on May 15, 2024

Sharp normally uses prebuilt binaries. In some cases it can not provide these binaries and tries to build a new one during installation. For this, a proper build environment is needed. See http://sharp.pixelplumbing.com/en/stable/install/#prerequisites

Sharp will be built from source at install time when:
  • a globally-installed libvips is detected,
  • pre-compiled binaries do not exist for the current platform and Node version, or
  • when the npm install --build-from-source flag is used.

So my guess is that Eugen is using a linux distribution for which no pre-compiled binary is provided. In such a case the installation will only succeed if the following requirements are met:

* C++11 compatible compiler such as gcc 4.8+, clang 3.0+ or MSVC 2013+ * node-gyp and its dependencies (includes Python)

@xylomorph: Could you help Eugen with installing these requirements under Linux?

The more general question is if these problems occur for most Linux users or if this is a special case. @xylomorph: Do you also have this problem?

If that is the case I would probably be forced to remove the png export completely from argdown-cli. It is simply not worth causing such headaches.

from argdown.

JenkaUbuntu avatar JenkaUbuntu commented on May 15, 2024

Installation of argunet still fails:

  • gcc was installed on my laptop when I first tried to update argdown to 0.9.0
  • node-gyp I added today
  • having gcc (5.4) and node-gyp installed, I tried to install argdown-cli again. The installation process failed ending in an infinite loop with warning user root does not have the permission to access the dev dir "/usr/local/lib/node_modules/argdown-cli/node_modules/sharp/.node-gyp"(screenshot attached)
    screenshot from 2018-04-11 15-45-11

from argdown.

christianvoigt avatar christianvoigt commented on May 15, 2024

see nodejs/node-gyp#454 (comment)

Have you run npm install argdown-cli -g with or without sudo?
You can try using --allow-root or --unsafe-perm, but this is considered to be unsafe. The safe way seems to be to use nvm (see link above).

from argdown.

JenkaUbuntu avatar JenkaUbuntu commented on May 15, 2024

Have you run npm install argdown-cli -g with or without sudo?
I had to run npm as root, for the installation process needs to change libraries in a root directory /usr
The safe way seems to be to use nvm (see link above).
Indeed, using nvm works.
Here are the steps:

  1. install nvm: https://github.com/tbaltrushaitis/tower-strike#install-nvm
  2. install nodejs (version 9.11.1): nvm install 9.11.1
  3. install argdown: nvm exec npm install -g argdown-cli

from argdown.

christianvoigt avatar christianvoigt commented on May 15, 2024

Great!

Our next problem is that argdown-cli is used in the VS Code extension. So if you install or update the extension, it will try to install sharp again (once I release a new version of the extension) and it will probably fail because it runs without nvm.

One solution would be if the extension depended on a globally installed version of argdown-cli, but that would require everyone to install it separately. So this would mean fixing a problem by making it worse.

I have to think about this some more. I might still have to remove the PNG export from argdown-cli.

from argdown.

christianvoigt avatar christianvoigt commented on May 15, 2024

Installing sharp in the VS Code extension also led to problems, so that decided the issue for me. I have removed the PNG export from argdown-cli.

If you want to use it (after all it works perfectly fine, once you have installed it), you can now add it to argdown-cli as an external plugin. Please visit the new home of the plugin for further details: https://github.com/christianvoigt/argdown-png-export

I am sorry for the inconvenience, but at least the whole process led to a really cool new feature of argdown-cli: you can now add your own custom plugins in the config file and execute them by using argdown run [my process name]! @xylomorph I think you will really like this (take a look here) :)

from argdown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.