foundation-sites: "foundation new" bug ? (phantomjs)

I’ve tried this on different Linux flavours and the problem is consistently reproducible.

  1. sudo npm install --global foundation-cli
  2. foundation new with the follwing options:
    • What are you building today? A website (Foundation for Sites)
    • What’s the project called? (no spaces) test
    • Which template would you like to use? ZURB Template: includes Handlebars templates and Sass/JS compilers

The below output is from my attempt on Fedora 27, prior to that I tried Centos 7. It doesn’t matter if I install NPM via yum or NPM direct repo.

                                                                                                                                               
            .                                                                                                                                  
           /|     ,                                                                                                                            
      , /|/  \/| /|       Thanks for using ZURB Foundation for Sites!                                                                          
     /|/       |/ |       -------------------------------------------                                                                          
 |___|            |___|   Let's set up a new project.                                                                                          
 \___|  ^^   ^^   |___/   It shouldn't take more than a minute.                                                                                
     | -[O]--[O]- |                                                                                                                            
     |    ___,    |                                                                                                                            
     |    ...     |                                                                                                                            
      \__________/                                                                                                                             
                                                                                                                                               
                                                                                                                                               
Downloading the project template...                                                                                                            
Done downloading!                                                                                                                              
                                                                                                                                               
Installing dependencies...                                                                                                                     
                                                                                                                                               
                                                                                                                                               
> optipng-bin@3.1.4 postinstall /home/foobar/foundation/test/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-optipng/node_m$
dules/optipng-bin                                                                                                                              
> node lib/install.js                                                                                                                          
                                                                                                                                               
  ✔ optipng pre-build test passed successfully

> gifsicle@3.0.4 postinstall /home/foobar/foundation/test/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-gifsicle/node_modu
les/gifsicle
> node lib/install.js

  ✔ gifsicle pre-build test passed successfully

> jpegtran-bin@3.2.0 postinstall /home/foobar/foundation/test/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-jpegtran/node_
modules/jpegtran-bin
> node lib/install.js

  ✔ jpegtran pre-build test passed successfully

> phantomjs-prebuilt@2.1.16 install /home/foobar/foundation/test/node_modules/gulp-uncss/node_modules/uncss/node_modules/phridge/node_modules/phant
omjs-prebuilt
> node install.js

PhantomJS not found on PATH
Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2
Saving to /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Receiving...
  [========================================] 100%
Received 22866K total.
Extracting tar contents (via spawned process)
Error extracting archive
Phantom installation failed { Error: Command failed: tar jxf /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
tar (child): bzip2: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

    at ChildProcess.exithandler (child_process.js:275:12)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Socket.stream.socket.on (internal/child_process.js:346:11)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at Pipe._handle.close [as _onclose] (net.js:554:12)
  killed: false,
  code: 2,
  signal: null,
  cmd: 'tar jxf /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2' } Error: Command failed: tar jxf /tmp/phantomjs/phantomjs-2.1.1-linux-x86_
64.tar.bz2
tar (child): bzip2: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

    at ChildProcess.exithandler (child_process.js:275:12)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Socket.stream.socket.on (internal/child_process.js:346:11)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at Pipe._handle.close [as _onclose] (net.js:554:12)

> uws@9.14.0 install /home/foobar/foundation/test/node_modules/browser-sync/node_modules/socket.io/node_modules/engine.io/node_modules/uws
> node-gyp rebuild > build_log.txt 2>&1 || exit 0

> node-sass@4.8.3 install /home/foobar/foundation/test/node_modules/gulp-sass/node_modules/node-sass                                               
> node scripts/install.js          

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.8.3/linux-x64-57_binding.node                                   
Download complete                  
Binary saved to /home/foobar/foundation/test/node_modules/gulp-sass/node_modules/node-sass/vendor/linux-x64-57/binding.node                        
Caching binary to /home/foobar/.npm/node-sass/4.8.3/linux-x64-57_binding.node                                                                      

> node-sass@4.8.3 postinstall /home/foobar/foundation/test/node_modules/gulp-sass/node_modules/node-sass                                           
> node scripts/build.js            

Binary found at /home/foobar/foundation/test/node_modules/gulp-sass/node_modules/node-sass/vendor/linux-x64-57/binding.node                        
Testing binary                     
Binary is fine                     

There were some problems during the installation.                      

 ✓ New project folder created.     
 ✗ Node modules not installed. Try running npm install manually.       
 ✓ Bower components installed.     

Once you've resolved the above issues, run foundation watch while inside the test folder.   

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (12 by maintainers)

Most upvoted comments

@DanielRuf Yeah, its called Bootstrap 4. 😃

If installation is your priority and not to have the better framework it may be a solution for you. However as @DanielRuf already pointed out it’s not a bug in Foundation but in phantomjs.

You can give it another try by following the link he posted (https://github.com/Medium/phantomjs/issues/659) and install bzip2 before running foundation new