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

./bin/www issue with github commit and deployment #261

Open
vickyRathee opened this issue May 3, 2020 · 4 comments
Open

./bin/www issue with github commit and deployment #261

vickyRathee opened this issue May 3, 2020 · 4 comments
Labels

Comments

@vickyRathee
Copy link

Expressjs default template has .bin/www to start the node js app. But bin folder is never committed to github (I can't find anyway until now).

So my codeCommit pipeline fails -

-------------------------------------
/var/log/nodejs/nodejs.log
-------------------------------------
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! myApp@0.0.0 start: `node ./bin/www`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the myApp@0.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

image

Should I delete the bin folder and rename www with server.js ? What exactly the www does? If I put it on main directory with rename..Will it cause any problem?

Or anyway to push it on git commit?

@dougwilson dougwilson transferred this issue from expressjs/express May 3, 2020
@dougwilson
Copy link
Contributor

If it is not being added with get add bin/www it sounds like you may have a git ignore ignoring that directory or file. You can generate your project with --git option to create a .gitignore with the expected filters.

@vickyRathee
Copy link
Author

No, it's nowhere in .gitignore. I saw other people have similar issue and can't upload /bin folder https://stackoverflow.com/questions/27575228/cant-push-bin-directory-to-github

@ryhinchey
Copy link

@vickyRathee Do you happen to have bin in a global gitignore file?

@jonchurch
Copy link
Member

jonchurch commented May 6, 2020

You can rule out if it's a a gitignore issue with a few commands.

Check what files are currently being ignored with:

git status --ignored

And then find what gitignore is responsible with:

git check-ignore -v bin

That last command may or may not work on windows.

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

No branches or pull requests

4 participants