Comments (4)
I don't think faker
allows you to invoke functions like that. Instead, use a function:
const faker = require('faker');
const seederConfig = {
services: [
{
path: 'markets',
count: 2,
template: {
name: () => faker.lorem.words(3),
slug: () => faker.lorem.words(1)
}
}
]
};
from feathers-seeder.
Thats not the problem, it made no difference with this approach of invoking. I could see faker working with previous approach on console, but data is not persisting when called by seeder and fails silently.
So it continues to fail even after I tried above.
from feathers-seeder.
Not sure the problem is within the seeder. This package just calls remove (unless you tell it not to), then generates data and calls create.
The seeding function returns a Promise that you can catch; it shouldn't fail silently.
Also, I have no experience with nuxt.js whatsoever. I hadn't heard of it until seeing this issue.
Try running the seed with "DEBUG" in your environment set to "feathers-seeder".
from feathers-seeder.
Thanks for opening the issue @thosakwe
In order to simplify for you to see the issue, I forked and prototyped the problem. I used default Nedb as well as Postgres (in use on my project)... and I can see the seeding worked with Nedb (markets model) but not Postgres (products model).
https://github.com/SharadKumar/feathers-nuxt/commit/951fe6403db558eafe931c261543ad256702ecfb
Any help is sincerely appreciated. Really keen to make seeder work, cause I am using Postman for now.
from feathers-seeder.
Related Issues (19)
- Seeder works on "services" and not "models" HOT 2
- Reset autoincrement value for sequelize-adapter HOT 4
- 1.0.8 not working anymore HOT 1
- support faker locale option HOT 3
- How to handle several dependent seeds HOT 3
- MIT License HOT 11
- enabling https HOT 3
- GeneralError: Cannot read property 'remove' of undefined HOT 1
- Getting dates in ISO format
- ResourceRequest timed out HOT 3
- Low Severe Vulnerabilities Found
- error: MethodNotAllowed: Can not remove multiple entries HOT 1
- Error on postinstall (Unknown plugin "add-module-exports") HOT 2
- question: creating users from predefined data HOT 1
- bug: number types in templates are empty HOT 1
- Import data 1:1 without randomization HOT 4
- Provide placeholder for Iterator number HOT 9
- executing order of service array HOT 4
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 feathers-seeder.