Comments (1)
After adding in some line-by-line checkpoints (commit 8bd2c9a) test results show that checkpoint number 13 was not reached before the error was thrown. Checkpoint 12 also fired before the error was thrown. In this sense I have isolated the error to be in the command
node app.js
In the error text there were references to missing credentials. Here is the full error statement:
Error: Missing credentials passed to snoowrap constructor. You must pass an object containing
either (a) userAgent, clientId, clientSecret, and refreshToken properties, (b) userAgent and
accessToken properties, or (c) userAgent, clientId, clientSecret, username, and password
properties. For information, please read the docs at https://not-an-aardvark.github.i
/snoowrap/.
at new snoowrap (/Users/AMRIT/GitHub/strat-collector/node_modules/snoowrap/dist/snoowrap.js:151:13)
at Object.<anonymous> (/Users/AMRIT/GitHub/strat-collector/app.js:10:12)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
at Function.Module.runMain (module.js:701:10)
at startup (bootstrap_node.js:193:16)
at bootstrap_node.js:617:3
As you can see, there is a lot of references to credentials. This got me thinking. Since the collector env cofigure module has not yet been configured, the app can't really work. It requires (not node require, english require) an env file containing environmental variables so that the bot knows where to look for these reddit posts and the sort. Since the nature of open source code is public, it is unsafe to commit credentials. Therefore, when local testing, you must include an environmental folder in the app. As soon as I connect the two modules (or maybe integrate them rather than having them as two separate repos) the first testing release can happen. This program is almost finished, it just needs a little push :).
In summary, the error was not with the script, but with the JavaScript file itself. Code kept calling env variables that didn't exist. You must add a env file before locally testing until the env-configure module is connected.
from strat-collector.
Related Issues (14)
- Environmental variables don't configure HOT 1
- Is the typescript branch necessary? HOT 1
- Validate submission HOT 2
- MongoDB HOT 1
- Pre-release versioning
- Find all function won't work
- Choose what data to extract HOT 5
- Data processing necessary? HOT 1
- Migrate to gulpJS HOT 1
- Reorganization necessary
- Mongoose keeps querying admin HOT 1
- Cannot overwrite 'Strats' model once compiled
- Bot needs own account HOT 2
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 strat-collector.