Foundation-sites: Node.js 9: Сrash when trying to install a new project (bug)

Created on 19 Feb 2018  ·  10Comments  ·  Source: foundation/foundation-sites

Hello. OS Ubuntu 16.04

How to reproduce this bug:

  1. I installed foundation by the guide
  2. Starts new project
  3. Try to start next project and app crashed

What should happen:

Installer must create files for new project

What happened instead:

Installer crushed. Terminal output:

usesa@pinkya-spot:/var/www/udemy-electron$ foundation new myApp
? What are you building today? A web app (Foundation for Apps)
? What's the project called? (no spaces) styles

           /|
          | |  /| ,
     .  /\|  \/ |/|
     |\/          |       Thanks for using ZURB Foundation for Apps!
     ||\__/\____/||       -------------------------------------------
  ___|| ======== ||___    Let's set up a new project.
 /___||  O    O  ||___\   It shouldn't take more than a minute.
     ||  ______, || 
     /|          |\
    /_/\\/\  /\//\_\
        \/\\//\/
           \/


Downloading the project template...
Done downloading!

Installing dependencies...

/usr/local/lib/node_modules/foundation-cli/node_modules/npm/node_modules/tar/lib/entry.js:165
  ;["path", "linkpath"].forEach(function (p) {
                        ^

TypeError: Cannot use 'in' operator to search for '0' in arguments_marker
    at forEach (<anonymous>)
    at Entry._setProps (/usr/local/lib/node_modules/foundation-cli/node_modules/npm/node_modules/tar/lib/entry.js:165:25)
    at new Entry (/usr/local/lib/node_modules/foundation-cli/node_modules/npm/node_modules/tar/lib/entry.js:46:8)
    at Extract.Parse._startEntry (/usr/local/lib/node_modules/foundation-cli/node_modules/npm/node_modules/tar/lib/parse.js:241:11)
    at Extract.Parse._process (/usr/local/lib/node_modules/foundation-cli/node_modules/npm/node_modules/tar/lib/parse.js:131:12)
    at BlockStream.<anonymous> (/usr/local/lib/node_modules/foundation-cli/node_modules/npm/node_modules/tar/lib/parse.js:47:8)
    at emitOne (events.js:125:13)
    at BlockStream.emit (events.js:221:7)
    at BlockStream._emitChunk (/usr/local/lib/node_modules/foundation-cli/node_modules/npm/node_modules/block-stream/block-stream.js:145:10)
    at BlockStream.resume (/usr/local/lib/node_modules/foundation-cli/node_modules/npm/node_modules/block-stream/block-stream.js:58:15)

Browser(s) and Device(s) tested on:

OS Ubuntu 16.04

Foundation Version(s) you are using:

Foundation CLI version 2.2.5

cli

All 10 comments

What is your npm and Node.js version?

Possibly related: https://github.com/nodejs/node/issues/16781

It seems to be an issue in v8 (the Node.js engine). Can you try nvm to use Node.js 8 with npm 5 instead of Node.js 9 (if you are using Node.js 9)?

@DanielRuf , yes i have 9 version of node. Ok, I'll try what you suggest to me now. But first time project installed w/o any errors.
:rocket: :rocket: :rocket:
upd. Problem solved. Node v8.9.4 project created all looks fine. Thank you!

Great. So it seems there is a bug in Node.js 9. We should track this one.

turbo_inline_array_builtins

The last release which had this flag enabled was Node.js 9.1.0.

Node.js 9.2.0 was the first release which contains the fix and should work.
So Node.js 9.2.0 and newer should work again.

https://github.com/nodejs/node/blob/v9.1.0/deps/v8/src/flag-definitions.h

https://github.com/nodejs/node/blob/v9.2.0/deps/v8/src/flag-definitions.h

NodeJS v 9.5.0

You're all set!

 ✓ New project folder created.
 ✓ Node modules installed.
 ✓ Bower components installed.

Now run foundation watch while inside the myapp2 folder.

Looks all fine. I thought I installed version 9.0.0 with apt-update. nvm is really awesome tool. Thanks one more time!

Thanks for the fast feedback. I'll close this issue as this is fixed in the latest Node.js releases.

nvm is really awesome tool. Thanks one more time!

You are welcome.
Thanks for reporting this issue.

Was this page helpful?
0 / 5 - 0 ratings