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

Trailing CR causes jspm to fail on Unix #2377

Closed
sylvainr opened this issue Oct 17, 2017 · 15 comments
Closed

Trailing CR causes jspm to fail on Unix #2377

sylvainr opened this issue Oct 17, 2017 · 15 comments

Comments

@sylvainr
Copy link

JSPM Version: beta.46

Transpiler Plugin(s): I do not use a transpiler

Details:
It appears that some bad carriage return characters got their way into jspm.js. It just started happening with the new beta.

The consequence is that beta.46 introduces issues on both Mac OS X and Linux, where the following issues shows up:

$ ./node_modules/.bin/jspm 
env: node\r: No such file or directory

The \r hints at some carriage return stuff. It is confirmed by running diff on jspm.js on the beta-45 and beta-46 with and without the strip-trailing-cr option:

$ diff --strip-trailing-cr /tmp/v45/node_modules/.bin/jspm /tmp/v46/node_modules/.bin/jspm | wc -l
       0
$ diff /tmp/v45/node_modules/.bin/jspm /tmp/v46/node_modules/.bin/jspm | wc -l
      88
@guybedford
Copy link
Member

Thanks for posting. Which version of npm are you using here? It seems like this should be fixed for installs of newer versions.

@guybedford
Copy link
Member

Reference: npm/npm#12371

@sylvainr
Copy link
Author

sylvainr commented Oct 17, 2017

I am using node 3.10.10 which is the most up to date version when installing Node LTS release ("Recommended for most users").

I still have the issue.

Skimming through npm/npm#12371 it seems to be a problem introduced on the publisher side.

@guybedford
Copy link
Member

@sylvainr the recommended NodeJS version is 6.11.4!

@sylvainr
Copy link
Author

sylvainr commented Oct 17, 2017

I am sorry, I meant npm 3.10.10.

The issue is easily reproducible in a docker container with the following versions:

root@4430b4a89289:~/test2# node --version
v6.11.4
root@4430b4a89289:~/test2# npm --version
3.10.10
root@4430b4a89289:~/test2# cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS"
root@4430b4a89289:~/test2# npm list | grep jspm
`-- jspm@0.17.0-beta.46
  +-- jspm-github@0.14.13
  +-- jspm-npm@0.30.3
  +-- jspm-registry@0.4.4

@guybedford
Copy link
Member

Ahh I see. I don't have access to a unix machine today, so if you're able to check running Node 8 with npm 5 let me know if that makes a difference.

@guybedford
Copy link
Member

(Will publish next release from unix again, wasn't aware of this issue)

@ffflabs
Copy link

ffflabs commented Oct 17, 2017

I'm having the same issue, tho I can't see any CR and it doesn't happen in all of my environments. In my local, using node 8.x, there's no problem. In my AWS instances, running node 4.x, it does happen.

For the time being, I'm pinning 0.17-beta.45.

@guybedford

Ahh I see. I don't have access to a unix machine today

This startled me. what is your usual dev environment?

@i8degrees
Copy link

Hi,

@guybedford This is happening for me, too, after upgrading to jspm v0.17.0-beta46 from jspm v0.17.0-beta42.

env: node\r: No such file or directory

Mac OS X "El Capitan" v10.11.6 (15G1217)
Node v8.4.0
npm v5.3.0

@havelock
Copy link

havelock commented Oct 19, 2017

@guybedford We ran into this as well.

Our team is using jspm in a project and we ran into this on Linux in the CI/CD agent. One of the devs re-installing their environment on macOS experienced this, too.

@guybedford
Copy link
Member

I've published a 0.17.0-beta.47 to resolve this. It's very odd that a standard NodeJS publish workflow doesn't work in Windows due to this convention breaking. Shows how unix the culture is!

@tjclement
Copy link

This seems to be reintroduced in 0.17.0-beta.48 again -> received the same error message on Mac OS, and downgrading to 47 resolved it.

@guybedford
Copy link
Member

Fixed in 0.17.0-beta.49.

@torson
Copy link

torson commented Jul 19, 2019

I get the same /usr/bin/env: ‘node\r’: No such file or directory when using 0.16.54 , works with 0.16.53 .

@guybedford
Copy link
Member

@torson thanks for reporting - that's a very annoying issue I should remember to avoid. I've published a 0.16.55 with the fix.

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

No branches or pull requests

7 participants