ERROR: Procfile does not exist, and problems starting web processes - node.js

So, I'm currently following this tutorial: https://devcenter.heroku.com/articles/nodejs to start a simple Node.js app. I've got to the part where foreman is used to run the app locally (under Declaring process types with Procfile), and I'm getting an error telling me that the Procfile does not exist. My Procfile is in the same directory as my code, etc. All of the steps up till now have been fine. I skipped past this part in the tutorial to try and run the application on Heroku, but this line heroku ps:scale web=1 under Visit your application tells me that there is "No such type as web"... I'm using Windows to develop my app. Any help would be much appreciated. :-)
EDIT: web: node web.js is the contents of the Procfile, and I'm following the tutorial so I assume it's being committed... could you check the tutorial please and tell me if it is?

I had also received the Procfile does not exist error. The issue with mine was that I had left the '.txt' extension on the file. Once I removed the file extension and ran the foreman start it worked perfectly, hope this help =)

Related

Heroku saying I don't have Procfile

basically, i have procfile (without .txt) and it says i dont, so i cant configure dynos on heroku
here is how the repository is like:
https://i.stack.imgur.com/tVYT0.png
the text in procfile:
worker: node bot.js
i am horrible at this and i never used StackOverflow so yeah- if you reply to this use an easy language
(this is a discord.js bot)
Here's some stuff that you might want to try,
1: Making sure that your document is named .Procfile (capital P and . before)
2: Checking build logs for errors
3: Deleting and re-creating your procfile
Also you should be using worker for a discord bot.

buildpack error deploying node.js app to heroku - files seem to be at the correct level>?

I am getting an error in the screen shot bellow deploying a node.js app on heroku saying that the buildpack was unable to detect a node.js codebase
I set the build pack, the package.json is at the root level as is the app.js file
https://www.dropbox.com/s/y1bg6eir2w93m8a/Screenshot%202020-05-29%2013.44.36.png?dl=0
Not sure what I am doing wrong - thanks!!
The error is clear:
A Node.js app on Heroku requires a package.json.
In the files listed below, you can see that the package.json file is missing. You have to commit it and repush your code to Heroku.

Why cant heroku find my node modules when deploying?

When I deploy I get the error Cannot find module '../../models/User' but my
solution works fine locally. here is a pic of my console console log of errors and a link to the repo https://github.com/No-MyNameIs/trashalbums
I understand similar questions have been presented and I worked through those solutions before presented and I tried working through those below with no luck. Any help would be appreciated.
Heroku deploy Error: Cannot find module - compilation
Heroku Cannot find module
console log of errors
The version of Node.js that will be used to run your application on Heroku, should also be defined in engines section of your package.json file.
For example:
"engines": {
"node": "11.0.0",
},
docs: https://devcenter.heroku.com/articles/deploying-nodejs#specify-the-version-of-node

'heroku local' cannot find module 'load-foreman-procfile'

I'm trying to run Heroku applications locally via 'heroku local,' but a missing module error is occurring in the Heroku CLI. Is this a Heroku bug that just needs to be reported or is there something wrong with how things have been setup on my machine (mac)? Any suggestions are appreciated.
In order to ensure my application isn't the problem, I've been debugging this issue with the node application Heroku provides in its getting started guides. Meaning, it already has a Procfile that can be run using default settings.
Things I've tried:
Re-install node modules for both application and CLI
Re-install the Heroku CLI
Here's the error:
node-js-getting-started [master] :> heroku local
Error: Cannot find module '../../load-foreman-procfile'
at Object.<anonymous> (/usr/local/Cellar/heroku/7.26.1/libexec/node_modules/#heroku-cli/plugin-local/lib/commands/local/index.js:5:18)
The file for the route above requires a 'load-foreman-procfile' like so:
const Procfile = require('../../load-foreman-procfile');
That require path doesn't lead to a to file by that name. In fact, this is the only reference to 'load-foreman-procfile' I can find in '/usr/local/Cellar/heroku/7.26.1'.
Rather than the error code above, I would expect heroku local to yield a running local server started via my Procfile.
I got the same error running heroku-cli v7.26.0. I switched to their edge channel (currently v7.26.2) and heroku local worked for me after that.
like #sophon mentioned - updating from v7.26.0 to v7.26.2 solved this for me. heroku update on mac did the trick.

Running meteor.js application on your own server

I am trying to run my meteor application on my local network so that when I am off-line I can still use the application on any devices connected to my network. I have been following http://ox86.tumblr.com/post/45184656062/running-your-meteor-js-application-on-your-own-server as a basic tutorial on how to do this. I am new to mongodb and node.js, which causes some trouble. However it seems that everything is working except I do not know where my app is running or what the address is? For example after I complete step 4 from the tutorial
export PORT=8080
export MONGO_URL=mongodb://bill:123456#localhost:27017/dbName
after navigating inside my bundle where main.js is I use
forever start main.js
There are no errors, but I don't know where my app is or if it is even working. Once again I am new to this idea of hosting my own meteor app. Any ideas or suggestions of what I am doing wrong. Also an explanation of the process would be much appreciated. Thanks for the help!
It's likely you have errors. You should check with forever logs main.js to see what you get.
From what it looks like you may have missed the ROOT_URL variable too.
export ROOT_URL=http://www.yoururl.com
export PORT=8080
export MONGO_URL=mongodb://bill:123456#localhost:27017/dbName
forever start main.js
The best check would be to see what you get in the forever logs. Also you may have to install fibers (before you start your app) if you have some error in your logs like invalid ELF header
cd bundle/programs/server/node_modules
rm -r fibers
npm install fibers#1.0.1

Resources