Estoy aprendiendo cómo crear una carpeta de distribución que contenga los archivos que se pueden implementar en un servidor web que aloja su proyecto. Esta carpeta de distribución se compilará a partir de los archivos de su proyecto utilizando varios paquetes y scripts de NPM.
Sin embargo cuando intento ejecutar el commando npm run build
obtengo errores con imagemin img/* -o dist/img
El codigo de la pagina esta sobre Bitbucket
mike@mike-thinks:~/Bootstrap4/conFusion$ sudo npm run build
> [email protected] build /home/mike/Bootstrap4/conFusion
> npm run clean && npm run imagemin && npm run copyfonts && npm run usemin
> [email protected] clean /home/mike/Bootstrap4/conFusion
> rimraf dist
> [email protected] imagemin /home/mike/Bootstrap4/conFusion
> imagemin img/* -o dist/img
Error: Error in file: img/logo.png
spawn /usr/local/lib/node_modules/imagemin-cli/node_modules/optipng-bin/vendor/optipng ENOENT
at exports._errnoException (util.js:870:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at nextTickCallbackWith2Args (node.js:441:9)
at process._tickCallback (node.js:355:17)
npm ERR! Linux 4.10.0-42-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "imagemin"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] imagemin: `imagemin img/* -o dist/img`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] imagemin script 'imagemin img/* -o dist/img'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the confusion package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! imagemin img/* -o dist/img
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs confusion
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls confusion
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/mike/Bootstrap4/conFusion/npm-debug.log
npm ERR! Linux 4.10.0-42-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build: `npm run clean && npm run imagemin && npm run copyfonts && npm run usemin`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script 'npm run clean && npm run imagemin && npm run copyfonts && npm run usemin'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the confusion package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run clean && npm run imagemin && npm run copyfonts && npm run usemin
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs confusion
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls confusion
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/mike/Bootstrap4/conFusion/npm-debug.log
El archivo npm-debug.log esta :
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'run', 'build' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle [email protected]~prebuild: [email protected]
6 silly lifecycle [email protected]~prebuild: no script for prebuild, continuing
7 info lifecycle [email protected]~build: [email protected]
8 verbose lifecycle [email protected]~build: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~build: PATH: /usr/share/npm/bin/node-gyp-bin:/home/mike/Bootstrap4/conFusion/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
10 verbose lifecycle [email protected]~build: CWD: /home/mike/Bootstrap4/conFusion
11 silly lifecycle [email protected]~build: Args: [ '-c',
11 silly lifecycle 'npm run clean && npm run imagemin && npm run copyfonts && npm run usemin' ]
12 silly lifecycle [email protected]~build: Returned: code: 1 signal: null
13 info lifecycle [email protected]~build: Failed to exec build script
14 verbose stack Error: [email protected] build: `npm run clean && npm run imagemin && npm run copyfonts && npm run usemin`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/share/npm/lib/utils/lifecycle.js:232:16)
14 verbose stack at emitTwo (events.js:87:13)
14 verbose stack at EventEmitter.emit (events.js:172:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/share/npm/lib/utils/spawn.js:24:14)
14 verbose stack at emitTwo (events.js:87:13)
14 verbose stack at ChildProcess.emit (events.js:172:7)
14 verbose stack at maybeClose (internal/child_process.js:821:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid [email protected]
16 verbose cwd /home/mike/Bootstrap4/conFusion
17 error Linux 4.10.0-42-generic
18 error argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build"
19 error node v4.2.6
20 error npm v3.5.2
21 error code ELIFECYCLE
22 error [email protected] build: `npm run clean && npm run imagemin && npm run copyfonts && npm run usemin`
22 error Exit status 1
23 error Failed at the [email protected] build script 'npm run clean && npm run imagemin && npm run copyfonts && npm run usemin'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the confusion package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error npm run clean && npm run imagemin && npm run copyfonts && npm run usemin
23 error You can get information on how to open an issue for this project with:
23 error npm bugs confusion
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls confusion
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]