Open trebleCode opened 5 years ago
You know what I did, as I am lazy, I was using public mongolab.com service create an account, add mongo schema, username/password, go to root config.js, in the project set:
db: { uri: process.env.MONGO_URI || "mongodb://vue-mongo-user:vue-mongo-password123@ds12-bla-bla.mlab.com:21413/vue-mongo", options: { // user: process.env.MONGO_USERNAME || "", // pass: process.env.MONGO_PASSWORD || "", useNewUrlParser: true } }
works perfect, until you have internet connection!
Cheers @dimylik , I was able to set up an account on mLab to test with, and that resolves the EADDRINUSE issue after I set a random port, but I still get this in the console:
(node:20368) UnhandledPromiseRejectionWarning: MongoError: The field 'required' is not valid for an index specification. Specification: { ns: "testdbscott.identitycounters", key: { field: 1, model: 1 }, name: "field_1_model_1", unique: true, required: true, index: -1, background: true }
at Function.MongoError.create (C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\mongoose\node_modules\mongodb-core\lib\error.js:31:11)
at C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\mongoose\node_modules\mongodb\lib\db.js:1096:80
at C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\mongoose\node_modules\mongodb-core\lib\connection\pool.js:469:18
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
(node:20368) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:20368) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
When I used the mLab account to connect to, that broke all of the styling on the page, and after authenticating with the test credentials, it just rendered a blank page.
What I'm really trying to understand though, is if you make a change to something in a Vue component, for example:
In the file /client/app/modules/home/index.vue, if I change the line on line 53: ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789 éáűőúöüóí ÉÁŰŐÚÖÜÓÍ
to LOOK AT ALL THE THINGS
save the index.vue file and refresh the page, nothing from that change is reflected in the page HTML. Why? Is it because of that unhandled async error, or something else. We are really wanting to use this boilerplate for a project, but not being able to modify anything is an obvious blocker.
I don't seem to get any errors other than the async error with npm run start
but if I use npm run dev
, I get a super long babel error:
ERROR in ./client/app/main.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Plugin/Preset files are not allowed to export objects, only functions. In C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\babel-preset-es2015\lib\index.js
at createDescriptor (C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\@babel\core\lib\config\config-descriptors.js:178:11)
at items.map (C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\@babel\core\lib\config\config-descriptors.js:109:50)
at Array.map (<anonymous>)
at createDescriptors (C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\@babel\core\lib\config\config-descriptors.js:109:29)
at createPresetDescriptors (C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\@babel\core\lib\config\config-descriptors.js:101:10)
at presets (C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\@babel\core\lib\config\config-descriptors.js:47:19)
at mergeChainOpts (C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\@babel\core\lib\config\config-chain.js:320:26)
at C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\@babel\core\lib\config\config-chain.js:283:7
at buildRootChain (C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\@babel\core\lib\config\config-chain.js:120:22)
at loadPrivatePartialConfig (C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\@babel\core\lib\config\partial.js:85:55)
at Object.loadPartialConfig (C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\@babel\core\lib\config\partial.js:110:18)
at Object.<anonymous> (C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\babel-loader\lib\index.js:140:26)
at Generator.next (<anonymous>)
at asyncGeneratorStep (C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\babel-loader\lib\index.js:3:103)
at _next (C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\babel-loader\lib\index.js:5:194)
at C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\babel-loader\lib\index.js:5:364
@ multi webpack-hot-middleware/client ./client/app/main.js app[1]
ERROR in ./client/frontend/main.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Plugin/Preset files are not allowed to export objects, only functions. In C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\babel-preset-es2015\lib\index.js
at createDescriptor (C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\@babel\core\lib\config\config-descriptors.js:178:11)
at items.map (C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\@babel\core\lib\config\config-descriptors.js:109:50)
at Array.map (<anonymous>)
at createDescriptors (C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\@babel\core\lib\config\config-descriptors.js:109:29)
at createPresetDescriptors (C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\@babel\core\lib\config\config-descriptors.js:101:10)
at presets (C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\@babel\core\lib\config\config-descriptors.js:47:19)
at mergeChainOpts (C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\@babel\core\lib\config\config-chain.js:320:26)
at C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\@babel\core\lib\config\config-chain.js:283:7
at buildRootChain (C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\@babel\core\lib\config\config-chain.js:120:22)
at loadPrivatePartialConfig (C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\@babel\core\lib\config\partial.js:85:55)
at Object.loadPartialConfig (C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\@babel\core\lib\config\partial.js:110:18)
at Object.<anonymous> (C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\babel-loader\lib\index.js:140:26)
at Generator.next (<anonymous>)
at asyncGeneratorStep (C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\babel-loader\lib\index.js:3:103)
at _next (C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\babel-loader\lib\index.js:5:194)
at C:\Users\Pythagoras\desktop\vue-express-mongo-boilerplate\node_modules\babel-loader\lib\index.js:5:364
@ multi webpack-hot-middleware/client ./client/frontend/main.js frontend[1]
Either way, any further help figuring any of this out would be greatly appreciated.
Hi IceBob,
I went through alot of this today to resolve some dependencies bark messages from Git Bash. After doing that, I'm still getting errors at the console about deprecated Mongo methods, and a messy error string. I've tried installing and importing mongo-autoinc-plugin, but to no avail, and have also tried changing the Device's startAt to various values, but to no effect. I see these errors whether after an immediate clone, or with my dependency resolution updates.
The main struggle has been finding out how to stop errors so that I can make changes to the boilerplate and have it show up on the page since it seems with these errors it will never fully render changes correctly.
Node: v8.11.4 npm: 5.6.0
Here's my current package.JSON and console output when trying to send npm run start
Console output:
Any assistance here would be greatly appreciated.