Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm i fails #12

Closed
vith opened this issue Aug 12, 2016 · 17 comments
Closed

npm i fails #12

vith opened this issue Aug 12, 2016 · 17 comments

Comments

@vith
Copy link

vith commented Aug 12, 2016

> jspm bundle dev-bundle.config.js out/dev-bundle.js -id

     Building the bundle tree for dev-bundle.config.js...

err  TypeError: jspm_packages/github/frankwallis/plugin-typescript@5.0.9/transpiler.js: (0 , _getIterator3.default) is not a function
    at Parser.loadPlugins (/home/vith/react-ts-jspm-starter-kit/node_modules/babylon/lib/parser/index.js:96:56)
    at new Parser (/home/vith/react-ts-jspm-starter-kit/node_modules/babylon/lib/parser/index.js:58:27)
    at parse (/home/vith/react-ts-jspm-starter-kit/node_modules/babylon/lib/index.js:47:10)
    at File.parse (/home/vith/react-ts-jspm-starter-kit/node_modules/babel-core/lib/transformation/file/index.js:517:34)
    at File.parseCode (/home/vith/react-ts-jspm-starter-kit/node_modules/babel-core/lib/transformation/file/index.js:603:20)
    at /home/vith/react-ts-jspm-starter-kit/node_modules/babel-core/lib/transformation/pipeline.js:49:12
    at File.wrap (/home/vith/react-ts-jspm-starter-kit/node_modules/babel-core/lib/transformation/file/index.js:563:16)
    at Pipeline.transform (/home/vith/react-ts-jspm-starter-kit/node_modules/babel-core/lib/transformation/pipeline.js:47:17)
    at Object.exports.compile (/home/vith/react-ts-jspm-starter-kit/node_modules/systemjs-builder/compilers/compiler.js:22:22)
    at Object.exports.compile (/home/vith/react-ts-jspm-starter-kit/node_modules/systemjs-builder/compilers/register.js:4:19)
    at /home/vith/react-ts-jspm-starter-kit/node_modules/systemjs-builder/lib/compile.js:117:43
    at tryCatcher (/home/vith/react-ts-jspm-starter-kit/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/vith/react-ts-jspm-starter-kit/node_modules/bluebird/js/release/promise.js:504:31)
    at Promise._settlePromise (/home/vith/react-ts-jspm-starter-kit/node_modules/bluebird/js/release/promise.js:561:18)
    at Promise._settlePromiseCtx (/home/vith/react-ts-jspm-starter-kit/node_modules/bluebird/js/release/promise.js:598:10)
    at Async._drainQueue (/home/vith/react-ts-jspm-starter-kit/node_modules/bluebird/js/release/async.js:143:12)

npm ERR! Linux 4.6.5-1-lqx
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "bundle-dev"
npm ERR! node v6.3.1
npm ERR! npm  v3.10.6
npm ERR! code ELIFECYCLE
npm ERR! react-ts-jspm-starter-kit@0.7.1 bundle-dev: `jspm bundle dev-bundle.config.js out/dev-bundle.js -id`
npm ERR! Exit status 1

full terminal session

version: v0.7.1-1-gae651fc

@vith
Copy link
Author

vith commented Aug 12, 2016

npm-debug.log

@piotrwitek piotrwitek self-assigned this Aug 12, 2016
@piotrwitek
Copy link
Owner

@vith thanks for detailed report, I have checked on clean ubuntu installation with zero global deps and install working fine, it seems like a problem with plugin typescript transpiler.
Could you try to delete jspm_packages folder and reinstall jspm deps with jspm install, then try to manually run npm run bundle-dev command

Other that that, I'm not sure what could be the problem.

@piotrwitek
Copy link
Owner

piotrwitek commented Aug 12, 2016

but event then solution should be working fine but without dev-bundle optimization, please try to run npm start to see if project is starting

@vith
Copy link
Author

vith commented Aug 12, 2016

Same error after deleting jspm_packages, running jspm install and npm run bundle-dev. But yes, npm start seems to work fine.

I'll see if I can reproduce it in a new VM.

@piotrwitek
Copy link
Owner

@vith Would be great if you can share your findings :)

Also please check maybe you have a typescript or jspm packages installed
globally, I would try to uninstall them as well and try again with
bundle-dev.

Pozdrawiam,
Piotr Witek

2016-08-12 15:23 GMT+02:00 Jason Papakostas notifications@github.com:

Same error after deleting jspm_packages, running jspm install and npm run
bundle-dev. But yes, npm start seems to work fine.

I'll see if I can reproduce it in a new VM.


You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
#12 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAtHA7-6qSORHvDgt3vI4b0DFZkRsO7Vks5qfHPlgaJpZM4JjCp1
.

@vith
Copy link
Author

vith commented Aug 12, 2016

I am able to reproduce it in antergos-2016.07.19-x86_64.iso live environment (2GB wasn't enough to avoid oom, 4GB was). All I did was:

$ sudo pacman -S git nodejs npm
$ git clone https://github.com/piotrwitek/react-ts-jspm-starter-kit
$ cd react-ts-jspm-starter-kit
$ npm i

Again no difference if I remove the jspm_packages directory and run ./node_modules/.bin/jspm install && npm run bundle-dev manually.

Inside the VM there's definitely no global install of typescript or jspm.

@piotrwitek
Copy link
Owner

Thanks, I gonna check it also with antergos to see if that's some machine specific issue.

@vith
Copy link
Author

vith commented Aug 12, 2016

I also just tested on Fedora-Workstation-Live-x86_64-24-1.2.iso live environment and could not reproduce with Fedora's packaged nodejs. However, I installed newer nodejs with https://rpm.nodesource.com/setup_6.x and was then able to reproduce.

I'm guessing the Ubuntu version you tested has old enough nodejs to not be affected.

Arch Linux: node v6.3.1: affected
Fedora 24: node v4.4.7: not affected
Fedora 24: node v6.3.1: affected

@piotrwitek
Copy link
Owner

this is my config, should be same as your original
{ npm: '3.10.6',
ares: '1.10.1-DEV',
http_parser: '2.7.0',
icu: '56.1',
modules: '48',
node: '6.3.1',
openssl: '1.0.2h',
uv: '1.9.1',
v8: '5.0.71.57',
zlib: '1.2.8' }

@piotrwitek
Copy link
Owner

also working fine on my windows laptop with this config: (linux is a desktop machine)

npm version
{ 'react-ts-jspm-starter-kit': '0.7.1',
  npm: '3.10.5',
  ares: '1.10.1-DEV',
  http_parser: '2.7.0',
  icu: '57.1',
  modules: '48',
  node: '6.3.1',
  openssl: '1.0.2h',
  uv: '1.9.1',
  v8: '5.0.71.57',
  zlib: '1.2.8' }

@piotrwitek
Copy link
Owner

Could you please also check for which architecture was the node binary used
in a failing cases

On Aug 12, 2016 4:23 PM, "Jason Papakostas" notifications@github.com
wrote:

I also just tested on Fedora-Workstation-Live-x86_64-24-1.2.iso live
environment and could not reproduce with Fedora's packaged nodejs. However,
I installed newer nodejs with https://rpm.nodesource.com/setup_6.x and
was then able to reproduce.

I'm guessing the Ubuntu version you tested has old enough nodejs to not be
affected.

Arch Linux: node v6.3.1: affected
Fedora 24: node v4.4.7: not affected
Fedora 24: node v6.3.1: affected


You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
#12 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAtHA6aKXWIw_0rn0s2sIVb-eJ2pkN-Uks5qfIHlgaJpZM4JjCp1
.

@vith
Copy link
Author

vith commented Aug 12, 2016

From my real Arch Linux environment:

~/react-ts-jspm-starter-kit masternpm version
{ 'react-ts-jspm-starter-kit': '0.7.1',
  npm: '3.10.6',
  ares: '1.10.1-DEV',
  http_parser: '2.7.1',
  icu: '57.1',
  modules: '48',
  node: '6.3.1',
  openssl: '1.0.2h',
  uv: '1.9.1',
  v8: '5.0.71.57',
  zlib: '1.2.8' }

~/react-ts-jspm-starter-kit masterfile "$(which node)"
/usr/bin/node: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=abc111a6272f59ebb7d3bb82a9514cb2b5341772, stripped

I am unable to reproduce in a new Ubuntu 16.04.1 VM, but its nodejs is 4.2.6. Have you installed 6.3.1 from a PPA? If so which one?

@vith
Copy link
Author

vith commented Aug 12, 2016

I don't get the error either on Ubuntu with nodejs from https://deb.nodesource.com/setup_6.x:

$ npm version
{ 'react-ts-jspm-starter-kit': '0.7.1',
  npm: '3.10.3',
  ares: '1.10.1-DEV',
  http_parser: '2.7.0',
  icu: '56.1',
  modules: '48',
  node: '6.3.1',
  openssl: '1.0.2h',
  uv: '1.9.1',
  v8: '5.0.71.57',
  zlib: '1.2.8' }

@piotrwitek
Copy link
Owner

Yes I have installed from nodesource, seems like Arch linux using some kind of community driven repository and might be the case of some differences in node binary
https://nodejs.org/en/download/package-manager/#arch-linux

@vith
Copy link
Author

vith commented Aug 13, 2016

Arch Linux's "community" repo contains official packages. It's just called community because packages in there started out as unofficial AUR (Arch User Repository) packages but have been adopted by the official maintainers (Trusted Users).

From Fedora using https://rpm.nodesource.com/setup_6.x, where I do get the error:

[vith@localhost react-ts-jspm-starter-kit]$ npm version
{ 'react-ts-jspm-starter-kit': '0.7.1',
  npm: '3.10.3',
  ares: '1.10.1-DEV',
  http_parser: '2.7.0',
  icu: '56.1',
  modules: '48',
  node: '6.3.1',
  openssl: '1.0.2h',
  uv: '1.9.1',
  v8: '5.0.71.57',
  zlib: '1.2.8' }
[vith@localhost react-ts-jspm-starter-kit]$ file `which node`
/usr/bin/node: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=0551551ef484b7875da457847daf6f01060c9269, stripped

npm version output is identical to what I get on Ubuntu, where the error doesn't happen. So none of those version numbers are the differentiator between it working and not working. Puzzling.

@piotrwitek
Copy link
Owner

Yea seems like a random bug in node or plugin-typescript.
You could try to use other node ver. that seems to work on your distro, e.g. 4.X which is more stable I suppose and would work on your system.
You can utilize tools for node version management like https://github.com/nodenv/nodenv to set up a local version of node just for that folder and use 6.X for the rest as usual.

@piotrwitek
Copy link
Owner

I'm closing this as I cannot see anything possible that I could do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants