Skip to content
This repository has been archived by the owner on May 13, 2021. It is now read-only.

env: node\r: No such file or directory #35

Closed
DaveVoyles opened this issue May 1, 2015 · 15 comments
Closed

env: node\r: No such file or directory #35

DaveVoyles opened this issue May 1, 2015 · 15 comments
Milestone

Comments

@DaveVoyles
Copy link
Contributor

Running OSX 10.10.2 Yosemite. Installed Manifold with:

npm install -g ManifoldJS

In terminal I try to run:

manifoldjs www.http://meteorite.azurewebsites.net
and I receive:

DaveVoyless-MacBook-Pro:~ DaveVoyles$ manifoldjs http://meteorite.azurewebsites.net
env: node\r: No such file or directory

What do you think the issue could be?

@boyofgreen
Copy link
Contributor

Hi Dave, we will review. Seems like a bug. Can you do me a favor? Can you rerun with the -l debug and shoot over the console?

@boyofgreen boyofgreen added this to the release-0.1.3 milestone May 3, 2015
@kevincobain2000
Copy link

@DaveVoyles
It is because of the new line \r on mac/unix machines. Do the following and it should be fine.

05/03/15 @ 4:15PM - kevincobain2000@Mac Air ~/Downloads cat /usr/local/bin/manifoldjs |col -b > temp;cp temp /usr/local/bin/manifoldjs

Note: I assume your manifoldjs is saved there --> /usr/local/bin/manifoldjs other just do type manifoldjs.


I think the problem is here ..? if you open https://github.com/manifoldjs/ManifoldJS/blob/master/manifoldjs.js#L1 in vim and check out the trailing new line char.

@DaveVoyles
Copy link
Contributor Author

Kevin,

What does that command do? Which part of the commad should I be coppying?

@kevincobain2000
Copy link

@DaveVoyles Explained in #36

@DaveVoyles
Copy link
Contributor Author

I see now, thanks.

So once that pull request is accepted, I can run npm -g install manifoldjs, and terminal will be able to locate the manifoldjs folder.

I'll hold tight until it is accepted

@nbellocam
Copy link
Contributor

Are you seeing this issue when installing from github directly? (you can use npm install -g manifoldjs/manifoldjs). Note: you may need to clean your npm cache.

@DaveVoyles
Copy link
Contributor Author

That was the answer!

If you install with just:
npm install -g manifoldjs it does not install correctly.
I needed manifoldjs/manifoldjs

From there, I ran ManifoldJS http://www.DaveVoyles.com and it generated a package.

All went well, but it could be confusing to users when it reads:

WARNING: One or more tasks failed while generating the Cordova application
WARNING: One or more errors occured when generating the application

I know that this is becuase I'm on OSX and doing a build, therefore Windows will not be added to the platform. This is also likely a warning from Cordova, so there's not much you can do there.

Thanks for the tip! Works fine

@nickdesaulniers
Copy link

If you install with just:
npm install -g manifoldjs it does not install correctly.
I needed manifoldjs/manifoldjs

Then the readme should be updated to reflect that. Let's reopen this issue to track that.

@nbellocam
Copy link
Contributor

Actually, this will be fixed with the new release (v0.1.3). Installing the module from GitHub is just a temporary workaround, as well as for testing purposes. No need to reopen this issue

@trevordunn
Copy link

I just tried installing from the command line and got this error as well (v0.4.1).
Installing with npm install -g manifoldjs/manifoldjs fixed it.

@boyofgreen
Copy link
Contributor

Will take a look. Thanks

@boyofgreen
Copy link
Contributor

Hi Trevor, I'm not able to re-create this on my pc. Are you using a mac by chance? can you tell me you os version and the NPM version you have installed?

@boyofgreen
Copy link
Contributor

Hi Trevor, I am able to see this on my mac as well, I think it's a line ending issue. Working on it

@trevordunn
Copy link

OSX 10.10.5
NPM 2.12.0

@ghost
Copy link

ghost commented Oct 19, 2015

Yes, it seems to be related to the line endings: the manifoldjs.js file within the published npm package has CR+LF as line endings instead of just LF.

Even though the manifoldjs.js file has the correct line endings in the repository (just LF), there is a setting that defines how Git handles line endings –my guess it that the Git settings in the machine where the 0.4.1 package was generated is telling Git to convert line endings to CR+LF on checkout.

I generated a pull request to include a .gitattributes that ensures to always use the correct line endings for the manifoldjs.js file, regardless of the Git settings configured in the local machine. In order to fix this issue, I suggest to:

  1. Merge the pull request
  2. Clone the repo again
  3. Make sure that the manifoldjs.js file has the correct line endings (just LF)
  4. Publish a new version

@ghost ghost locked as resolved and limited conversation to collaborators Feb 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants