rainforestapp / decaf

Coffeescript to ES.next transpiler. Now maintained over at
https://github.com/juliankrispel/decaf
MIT License
106 stars 10 forks source link

“Maximum call stack size” exceeded when trying to install #3

Closed flying-sheep closed 8 years ago

flying-sheep commented 8 years ago

console output

$ npm i --save juliankrispel/decaf

> cs2js@1.0.0 postinstall /home/phil/Dev/Web/jsx-decaf/node_modules/cs2js
> npm run build

> cs2js@1.0.0 build /home/phil/Dev/Web/jsx-decaf/node_modules/cs2js
> mkdir -p dist && babel src/parser.js --out-file dist/index.js

npm ERR! Linux 4.3.3-3-ARCH
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "build"
npm ERR! node v5.5.0
npm ERR! npm  v3.5.3
npm ERR! code ELIFECYCLE
npm ERR! cs2js@1.0.0 build: `mkdir -p dist && babel src/parser.js --out-file dist/index.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the cs2js@1.0.0 build script 'mkdir -p dist && babel src/parser.js --out-file dist/index.js'.
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 cs2js package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     mkdir -p dist && babel src/parser.js --out-file dist/index.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs cs2js
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls cs2js
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/phil/Dev/Web/jsx-decaf/node_modules/cs2js/npm-debug.log

tail of debug log:

15899 silly postinstall cs2js@1.0.0 /home/phil/Dev/Web/jsx-decaf/node_modules/.staging/cs2js-511836dc
15900 info lifecycle cs2js@1.0.0~postinstall: cs2js@1.0.0
15901 verbose lifecycle cs2js@1.0.0~postinstall: unsafe-perm in lifecycle true
15902 verbose lifecycle cs2js@1.0.0~postinstall: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/home/phil/Dev/Web/jsx-decaf/node_modules/cs2js/node_modules/.bin:/home/phil/Dev/Web/jsx-decaf/node_modules/.bin:/opt/context-minimals/texmf-linux-64/bin:/home/phil/bin:/usr/local/bin:/usr/bin:/usr/bin/core_perl:/usr/bin/vendor_perl
15903 verbose lifecycle cs2js@1.0.0~postinstall: CWD: /home/phil/Dev/Web/jsx-decaf/node_modules/cs2js
15904 silly lifecycle cs2js@1.0.0~postinstall: Args: [ '-c', 'npm run build' ]
15905 silly lifecycle cs2js@1.0.0~postinstall: Returned: code: 1  signal: null
15906 info lifecycle cs2js@1.0.0~postinstall: Failed to exec postinstall script
15907 verbose stack RangeError: Maximum call stack size exceeded
15907 verbose stack     at Array.filter (native)
15907 verbose stack     at /usr/lib/node_modules/npm/lib/install/actions.js:55:37
15907 verbose stack     at Array.forEach (native)
15907 verbose stack     at markAsFailed (/usr/lib/node_modules/npm/lib/install/actions.js:54:16)
15907 verbose stack     at /usr/lib/node_modules/npm/lib/install/actions.js:57:7
15907 verbose stack     at Array.forEach (native)
15907 verbose stack     at markAsFailed (/usr/lib/node_modules/npm/lib/install/actions.js:54:16)
15907 verbose stack     at /usr/lib/node_modules/npm/lib/install/actions.js:57:7
15907 verbose stack     at Array.forEach (native)
15907 verbose stack     at markAsFailed (/usr/lib/node_modules/npm/lib/install/actions.js:54:16)
15908 verbose cwd /home/phil/Dev/Web/jsx-decaf
15909 error Linux 4.3.3-3-ARCH
15910 error argv "/usr/bin/node" "/usr/bin/npm" "i" "--save" "juliankrispel/decaf"
15911 error node v5.5.0
15912 error npm  v3.5.3
15913 error Maximum call stack size exceeded
15914 error If you need help, you may report this error at:
15914 error     <https://github.com/npm/npm/issues>
15915 verbose exit [ 1, true ]
juliankrispel commented 8 years ago

Ha, interesting, I don't get that, looks like I need to resort to publishing the compiled module

juliankrispel commented 8 years ago

@flying-sheep kk, I'm shipping it as 'compiled' now and published it to npm, you should be able to install it via npm install decafjs

juliankrispel commented 8 years ago

let me know if that solved the issue for you as I couldn't reproduce it :)

flying-sheep commented 8 years ago

hmm, the npm version misses parts though:

e.g. this is missing from the code:

  if (type === 'Literal') {
    return mapLiteral(node, meta);
  } else if (type === 'Range') {
    return mapRange(node, meta);
  } else if (type === 'Bool') {
    return mapBoolean(node, meta);
  } else if (type === 'Arr' && meta.left === true) {
    return mapArrayPattern(node.base, meta);
  } else if (type === 'Arr') {
    return mapArrayExpression(node.base, meta);
  } else if (type === 'Obj') {
    return mapObjectExpression(node, meta);
  } else if (type === 'Parens') {
    return _astTypes.builders.sequenceExpression(node.base.body.expressions.map(function (expr) {
      return mapExpression(expr, meta);
    }));
  }
juliankrispel commented 8 years ago

The npm version will just contain the compiled version now but nothing should be missing really

Julian Krispel-Samsel rainforestqa.com goodafternoon.co

On Jan 25, 2016, at 21:13, Philipp A. notifications@github.com wrote:

hmm, the npm version misses parts though:

e.g. this is missing from the code:

if (type === 'Literal') { return mapLiteral(node, meta); } else if (type === 'Range') { return mapRange(node, meta); } else if (type === 'Bool') { return mapBoolean(node, meta); } else if (type === 'Arr' && meta.left === true) { return mapArrayPattern(node.base, meta); } else if (type === 'Arr') { return mapArrayExpression(node.base, meta); } else if (type === 'Obj') { return mapObjectExpression(node, meta); } else if (type === 'Parens') { return _astTypes.builders.sequenceExpression(node.base.body.expressions.map(function (expr) { return mapExpression(expr, meta); })); } — Reply to this email directly or view it on GitHub.

flying-sheep commented 8 years ago

But it does. Look at the if/else tree: the npm version misses 2 branches

juliankrispel commented 8 years ago

oh shit, thanks.

Fixed now, @flying-sheep

flying-sheep commented 8 years ago

haha, np.

btw: what was wrong: did you simply have an old revision checked out when doing npm publish?

juliankrispel commented 8 years ago

@flying-sheep it was a typo in the npm hook. prebublish :D, hence when publishing it didn't actually rebuild and used an outdated version...

flying-sheep commented 8 years ago

aah noice :laughing: