CityOfBoston / boston.gov-d7

Once housed code for boston.gov. Have moved to Drupal 8 as of November 2019.
Other
287 stars 63 forks source link

frontend:build fails #621

Closed shelane closed 7 years ago

shelane commented 7 years ago

I get all the way to the point in the build process where I get a failure doing ./tash.sh frontend:build

 [exec] 
 [exec] > boston@1.0.0 build:boston /Users/french/Sites/devdesktop/boston.gov
 [exec] > gulp
 [exec] 
 [exec] [15:43:19] Using gulpfile ~/Sites/devdesktop/boston.gov/gulpfile.js
 [exec] [15:43:19] Starting 'clean:css'...
 [exec] [15:43:19] Finished 'clean:css' after 5.92 ms
 [exec] [15:43:19] Starting 'styles:production'...
 [exec] [15:43:19] Starting 'images'...
 [exec] [15:43:20] Starting 'clean:styleguide'...
 [exec] [15:43:20] Finished 'clean:styleguide' after 1.47 ms
 [exec] [15:43:20] Starting 'styleguide:markup'...
 [exec] [15:43:20] Finished 'styleguide:markup' after 11 ms
 [exec] [15:43:20] Starting 'styles:styleguide'...
 [exec] [15:43:20] Starting 'scripts'...
 [exec] [15:43:20] Starting 'scripts:iframe'...
 [exec] [15:43:20] Starting 'ie'...
 [exec] ./docroot/sites/all/themes/custom/boston/dist/ie
 [exec] [15:43:20] optimized images: docroot/sites/all/themes/custom/boston/src/img/b-logo-dark.png
 [exec] [15:43:20] optimized images: docroot/sites/all/themes/custom/boston/src/img/b-logo-large.png
 [exec] 
 [exec] events.js:141
 [exec]       throw er; // Unhandled 'error' event
 [exec]       ^
 [exec] Error: spawn /Users/french/Sites/devdesktop/boston.gov/node_modules/optipng-bin/vendor/optipng ENOENT
 [exec]     at exports._errnoException (util.js:856:11)
 [exec]     at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
 [exec]     at onErrorNT (internal/child_process.js:344:16)
 [exec]     at nextTickCallbackWith2Args (node.js:474:9)
 [exec]     at process._tickCallback (node.js:388:17)
 [exec] WARNING: In order to avoid variable namespace collisions, we have updated the way to add breakpoints for respond-to. Please change all instances of `$breakpoints: add-breakpoint()` to `@include add-breakpoint()`. The `add-breakpoint()` function will be deprecated in a future release.
 [exec]     on line 12 of node_modules/breakpoint-sass/stylesheets/breakpoint/_respond-to.scss
 [exec]     from line 39 of docroot/sites/all/themes/custom/boston/src/sass/components/button/_button.scss
 [exec] 

[foreach] /Users/french/Sites/devdesktop/boston.gov/build/custom/phing/tasks/frontend.xml:6:44: Task exited with code 139

BUILD FAILED /Users/french/Sites/devdesktop/boston.gov/build/custom/phing/tasks/frontend.xml:3:31: Execution of the target buildfile failed. Aborting.

Total time: 42.2654 seconds

matthewcrist commented 7 years ago

@shelane what version of NPM are you using? should be 5.0 or higher.

shelane commented 7 years ago

Yes, my version is 5.4.1

matthewcrist commented 7 years ago

@shelane this should be fixed. looks like gulp-imagemin had a breaking patch. i've switched over to gulp-image (https://www.npmjs.com/package/gulp-image), which may require additional setup.

shelane commented 7 years ago

I installed gulp-image with all of its dependencies and get a fail at ./task.sh frontend:install

I should have also included the log that the output mentioned, which I missed last time. Here is my log from npm-debug.log

0 info it worked if it ends with ok 1 verbose cli [ '/Users/french/.nvm/versions/node/v5.4.1/bin/node', 1 verbose cli '/Users/french/.nvm/versions/node/v5.4.1/bin/npm', 1 verbose cli 'run', 1 verbose cli 'install-dependencies' ] 2 info using npm@3.3.12 3 info using node@v5.4.1 4 verbose run-script [ 'preinstall-dependencies', 4 verbose run-script 'install-dependencies', 4 verbose run-script 'postinstall-dependencies' ] 5 info lifecycle boston@1.0.0~preinstall-dependencies: boston@1.0.0 6 silly lifecycle boston@1.0.0~preinstall-dependencies: no script for preinstall-dependencies, continuing 7 info lifecycle boston@1.0.0~install-dependencies: boston@1.0.0 8 verbose lifecycle boston@1.0.0~install-dependencies: unsafe-perm in lifecycle true 9 verbose lifecycle boston@1.0.0~install-dependencies: PATH: /Users/french/.nvm/versions/node/v5.4.1/lib/node_modules/npm/bin/node-gyp-bin:/Users/french/Sites/devdesktop/boston.gov/node_modules/.bin:/Users/french/.nvm/versions/node/v5.4.1/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/DevDesktop/drush:~/bin:/Users/french/.composer/vendor/bin:/Applications/DevDesktop/drush 10 verbose lifecycle boston@1.0.0~install-dependencies: CWD: /Users/french/Sites/devdesktop/boston.gov 11 silly lifecycle boston@1.0.0~install-dependencies: Args: [ '-c', 'yarn install' ] 12 info lifecycle boston@1.0.0~install-dependencies: Failed to exec install-dependencies script 13 verbose stack Error: boston@1.0.0 install-dependencies: yarn install 13 verbose stack spawn ENOENT 13 verbose stack at ChildProcess. (/Users/french/.nvm/versions/node/v5.4.1/lib/node_modules/npm/lib/utils/spawn.js:17:16) 13 verbose stack at emitTwo (events.js:87:13) 13 verbose stack at ChildProcess.emit (events.js:172:7) 13 verbose stack at maybeClose (internal/child_process.js:821:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) 14 verbose pkgid boston@1.0.0 15 verbose cwd /Users/french/Sites/devdesktop/boston.gov/docroot 16 error Darwin 14.5.0 17 error argv "/Users/french/.nvm/versions/node/v5.4.1/bin/node" "/Users/french/.nvm/versions/node/v5.4.1/bin/npm" "run" "install-dependencies" 18 error node v5.4.1 19 error npm v3.3.12 20 error file sh 21 error code ELIFECYCLE 22 error errno ENOENT 23 error syscall spawn 24 error boston@1.0.0 install-dependencies: yarn install 24 error spawn ENOENT 25 error Failed at the boston@1.0.0 install-dependencies script 'yarn install'. 25 error Make sure you have the latest version of node.js and npm installed. 25 error If you do, this is most likely a problem with the boston package, 25 error not with npm itself. 25 error Tell the author that this fails on your system: 25 error yarn install 25 error You can get their info via: 25 error npm owner ls boston 25 error There is likely additional logging output above. 26 verbose exit [ 1, true ]

matthewcrist commented 7 years ago

Ah, good catch. I forgot to mention that we've switched from NPM to Yarn. You can get that installed here:

https://yarnpkg.com/lang/en/docs/install/

I'll get the documentation updated. Thank-you for your patience.