Auf einem frischen debian jessie EC2-Instanz installieren ich folgendes tun:Kann nicht npm 'Schluck-imagemin'
- sudo apt-get
- sudo apt-get update installieren curl -y
- curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
- sudo apt-get install -y NodeJS
- mkdir/tmp/real_node_modules
- ln -s/tmp/real_node_modules node_modules
- npm installieren 'schlucke-imagemin'
dann bekomme ich diese Fehlermeldung:
> [email protected] postinstall /home/admin/node_modules/optipng-bin
> node lib/install.js
module.js:442
throw err;
^
Error: Cannot find module 'bin-build'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/tmp/real_node_modules/optipng-bin/lib/install.js:3:16)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
npm WARN install:[email protected] [email protected] postinstall: `node lib/install.js`
npm WARN install:[email protected] Exit status 1
> [email protected] postinstall /home/admin/node_modules/jpegtran-bin
> node lib/install.js
module.js:442
throw err;
^
Error: Cannot find module 'bin-build'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/tmp/real_node_modules/jpegtran-bin/lib/install.js:4:16)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
npm WARN install:[email protected] [email protected] postinstall: `node lib/install.js`
npm WARN install:[email protected] Exit status 1
Es versteht sich von selbst, dass die Dinge ohne den Symlink Knotenmodule Ordner arbeiten, aber was ich versuche, herauszufinden, warum sie nicht funktionieren, wenn Sie einen symlinked Node Module-Ordner haben.
Nur ein Gedanke, aber haben Sie versucht, es in einem Verzeichnis laufen zu lassen, das kein symlinked node_modules-Verzeichnis enthält? –
Es versteht sich von selbst, dass dies funktioniert, wenn Sie kein symlinked node_modules-Verzeichnis haben. Allerdings muss ich einen für meinen Anwendungsfall haben. –
Du hättest es dann in deiner Frage klarstellen sollen. Vertrau mir, auf dieser Seite ist nichts überflüssig. –