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

Can't run private-bower #272

Open
sergey-suloev opened this issue Nov 20, 2017 · 4 comments
Open

Can't run private-bower #272

sergey-suloev opened this issue Nov 20, 2017 · 4 comments

Comments

@sergey-suloev
Copy link

pi@haniraspi:~/bower$ sudo private-bower --config private-bower-config.json
/usr/bin/env: ‘node\r’: No such file or directory

@tylercrocker
Copy link

tylercrocker commented Jan 10, 2018

I'm also getting this... Using Ubuntu 16.04 and here are all my node/npm/bower installs:

root@nile:/home/tyler# which node
/usr/bin/node
root@nile:/home/tyler# which npm
/usr/bin/npm
root@nile:/home/tyler# which bower
/usr/local/bin/bower
root@nile:/home/tyler# node --version
v4.2.6
root@nile:/home/tyler# npm --version
3.5.2
root@nile:/home/tyler# bower --version
1.8.2

My config file looks like this (with hostname and password pulled out):

{
    "registryFile": "./bowerRepository.json",
    "timeout": 144000,
    "server": {
        "hostName": "__HOSTNAME__",
        "port": 80
    },
    "public": {
        "disabled": true
    },
    "authentication": {
        "enabled": true,
        "key": "__PASSWORD__"
    },
    "repositoryCache": {
        "cachePrivate": false,
        "git": {
            "enabled": false,
            "cacheDirectory": "./gitRepoCache",
            "host": "localhost",
            "port": 6789,
            "publicAccessURL" : null,
            "refreshTimeout": 10
        },
        "svn": {
            "enabled": false,
            "cacheDirectory": "./svnRepoCache",
            "host": "localhost",
            "port": 7891,
            "publicAccessURL" : null,
            "refreshTimeout": 10
        }
    },
    "proxySettings" : {
        "enabled": false,
        "host": "proxy",
        "username": "name",
        "password" : "pass",
        "port": 8080,
        "tunnel": false
    },
    "log4js" : {
        "enabled": false,
        "configPath" : "log4js.conf.json"
    }
}

But I'm seeing the error that @sergey-suloev posted above regardless of specifying a config or not.

A coworker of mine was able to run the scripts that are included in this repo manually in a node console (on the server we're trying to set this up on) and they worked, but that can't actually be our solution.

Any thoughts would be appreciated!

@sergey-suloev
Copy link
Author

sergey-suloev commented Jan 11, 2018

@tylercrocker As far as I remember this issue can be fixed by removing Windows-style line endings from the private-bower script. I don't have a bash example at hand, try sed.

@siseko
Copy link

siseko commented Jan 17, 2018

I also had the same issue and converted the line endings using dos2unix private-bower. Weird thing is that I never got the issue on my local but I got it on a server we use. The version of private-bower is the same on both machines so I'm not sure how one has CRLF line endings. I spent about half a day trying to figure out what the issue is. Hope this helps someone else.

@tylercrocker
Copy link

@sergey-suloev Thanks for the feedback, we were assuming it was something like that, but I wasn't able to immediately find this. Sounds like @siseko was able to get it to work, but it IS weird that it even has this issue?

We no longer have a need for this, so we won't be pursing it any further; but hopefully a more straight-forward solution can be found for others?

Thanks!

scic added a commit to scic/docker-private-bower that referenced this issue Jan 29, 2018
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

3 participants