Comments (5)
I ran into this issue too, but then I looked ahead in case a solution to my issue was addressed later on and it was.
However the command given on the course:
$ heroku config:set MONGODB_URI='mongodb+srv://fullstack:[email protected]/note-app?retryWrites=true'
Would simply result in this:
» Error: Missing required flag: » -a, --app APP app to run command against » See more help with --help 'w' is not recognized as an internal or external command, operable program or batch file.
Maybe some things changed with Heroku CLI since the tutorial was written (or more likely idk how to use Heroku CLI) but it took me like 30 minutes to make sense of the error. What ended up working for me was:
From the start in case you never set up Heroku CLI....
$heroku login
$heroku apps
//in case you forgot app-name
$heroku config:set -a your-app-name MONGODB_URI='your_mongoDB_URI'
from fullstack-hy2020.github.io.
On moving forward with the course I saw that declaring environment variables in heroku is illustrated in part 3d but the app is already hosted on heroku in part 3b so students might deploy their app to heroku after part 3c and run into errors.(my case)
It would be better to illustrate heroku config right next to dotenv package
from fullstack-hy2020.github.io.
I came here to suggest this also. I finally got my phonebook app working (using heroku config:set ENV_VAR=password
) after several days of frustration and googling, but for some weird reason I did not have the same problem with my notes app. Both databases are side-by-side, in the mongodb "Collections" in the same cluster. Both apps use the same exact versions of everything.
I did not want to move forward to the next section until I got this part all working. I must have deleted and re-created at least 10 heroku apps. Stackoverflow to the rescue!
from fullstack-hy2020.github.io.
Also heroku variables can be set manually via web heroku and that seems much better option to me.
Though command line always wins if you know the command you are looking for.
But if you are willing with website way - its done via going to Setttings page
and then adding variable there -
from fullstack-hy2020.github.io.
this will be clarified in 2022 edition
from fullstack-hy2020.github.io.
Related Issues (20)
- npm i vs npm ci? HOT 1
- part 4.c User Administration (creating users): latest mongoose-unique-validator v4.0.0 needs at least mongoose v7.0.0 HOT 1
- Part 7c: <Form.Group> usage inconsistent with documentation
- Unclear statement
- Part 0b: DOM introduction example HOT 1
- Same examples for "directory structure" on part0 and part1 HOT 1
- [3.a] Replace CommonJS with ESM HOT 1
- A passage in the Finnish version of 0b on the concept of fullstack is quite unclear HOT 2
- Best process for making corrections across languages? HOT 1
- type Error in the course part-03 ( Node.js and Express )
- part 7e - "React/node-application security" references create-react-app
- part 10a -- Compatibility issue with Expo 46 not compatible for iOS mobile development
- More precise MongoDB help link in 8.14: Database, part 2
- part10c -- Constant.manifest is deprecated HOT 1
- part10b -- Replace Formik "Render Prop" Pattern with Hooks instead HOT 1
- Typo in 4d authorization example
- My web error 404
- part 4b standalone expect function HOT 1
- part4b jest to node --test bugs HOT 7
- part6b-c - Exercise 6.10 requests a task that is only explained after the exercise
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fullstack-hy2020.github.io.