Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libpng-dev and data dir missing for successfull build #1

Open
asys3 opened this issue Jun 1, 2021 · 2 comments
Open

libpng-dev and data dir missing for successfull build #1

asys3 opened this issue Jun 1, 2021 · 2 comments

Comments

@asys3
Copy link

asys3 commented Jun 1, 2021

Great to have Doodle3d Open Source and offline enabled! Thanks for that.

Just 2 findings when compiling on my Linux Mint 20.1 machine:

  • libpng-dev must be installed (could be mentioned in requirements to build)
  • the directory "data" should exist, other wise the build fails:
> [email protected] dist:licenses
> node licenses-to-json.js . > data/licenses.json

sh: 1: cannot create data/licenses.json: Directory nonexistent
npm ERR! code 2
npm ERR! path /home/uwe/Doodle3D-Transform
npm ERR! command failed
npm ERR! command sh -c npm run dist:prepare

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/uwe/.npm/_logs/2021-06-01T04_35_35_614Z-debug.log
uwe@aspi:~/Doodle3D-Transform$ vi licenses-to-json.js 
uwe@aspi:~/Doodle3D-Transform$ ls data
ls: Zugriff auf 'data' nicht möglich: Datei oder Verzeichnis nicht gefunden

So I manually created it and it works:

uwe@aspi:~/Doodle3D-Transform$ mkdir data
uwe@aspi:~/Doodle3D-Transform$ npm install

> [email protected] postinstall
> npm run dist:prepare


> [email protected] dist:prepare
> npm run dist:licenses && mkdir -p dist && rimraf dist/*


> [email protected] dist:licenses
> node licenses-to-json.js . > data/licenses.json


up to date, audited 1811 packages in 16s
casperlamboo added a commit that referenced this issue Jun 1, 2021
@casperlamboo
Copy link
Contributor

Hi @asys3 thanks for the issue report. We don't actively use libpng-dev. The only dependency I could think of that would depend on such a package would be sharp. (which we don't use any more so I removed it). Could you test if the package now installs correctly on your device?

@asys3
Copy link
Author

asys3 commented Jun 1, 2021

I just restartet on a fresh machine with npm 7.15.1 and again there's a problem with building pngquant

uwe@syro:~/Doodle3D-Transform$ npm install
npm ERR! code 1
npm ERR! path /home/uwe/Doodle3D-Transform/node_modules/pngquant-bin
npm ERR! command failed
npm ERR! command sh -c node lib/install.js
npm ERR! ⚠ The `/home/uwe/Doodle3D-Transform/node_modules/pngquant-bin/vendor/pngquant` binary doesn't seem to work correctly
npm ERR!   ⚠ pngquant pre-build test failed
npm ERR!   ℹ compiling from source
npm ERR!   ✔ pngquant pre-build test passed successfully
npm ERR!   ✖ Error: pngquant failed to build, make sure that libpng-dev is installed
npm ERR!     at Promise.all.then.arr (/home/uwe/Doodle3D-Transform/node_modules/pngquant-bin/node_modules/bin-build/node_modules/execa/index.js:231:11)
npm ERR!     at process._tickCallback (internal/process/next_tick.js:68:7)

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/uwe/.npm/_logs/2021-06-01T14_02_04_662Z-debug.log
uwe@syro:~/Doodle3D-Transform$ 

And here's the interesting part in the debug.log:

784 timing metavuln:calculate:security-advisory:@doodle3d/doodle3d-slicer:IbMFApAcYVMwqP9R1xNmJ3CgyLhPnQrdOW+beRwjpB8xtth01QbjGZPCgM1P91t2VvZ+TJztnc4NLTDBx2dnVg== Completed in 2ms
785 timing auditReport:init Completed in 5999ms
786 timing reify:audit Completed in 6980ms
787 timing reifyNode:node_modules/@doodle3d/doodle3d-core Completed in 34567ms
788 timing reify:unpack Completed in 34577ms
789 timing reify:unretire Completed in 1215ms
790 timing build:queue Completed in 61ms
791 timing build:link:node_modules/pngquant-bin Completed in 30ms
792 timing build:link:node_modules/tempfile/node_modules/uuid Completed in 35ms
793 timing build:link Completed in 36ms
794 info run [email protected] postinstall node_modules/pngquant-bin node lib/install.js
795 info run [email protected] postinstall { code: 1, signal: null }
796 timing reify:rollback:createSparse Completed in 101ms
797 timing reify:rollback:retireShallow Completed in 2ms
798 timing command:install Completed in 39137ms
799 verbose stack Error: command failed
799 verbose stack     at ChildProcess.proc.on (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)
799 verbose stack     at ChildProcess.emit (events.js:198:13)
799 verbose stack     at maybeClose (internal/child_process.js:982:16)
799 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
800 verbose pkgid [email protected]
801 verbose cwd /home/uwe/Doodle3D-Transform
802 verbose Linux 5.4.0-73-generic
803 verbose argv "/usr/bin/node" "/usr/local/bin/npm" "install"
804 verbose node v10.19.0
805 verbose npm  v7.15.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants