-
-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use uniform without meteor #148
Comments
@radekmie thanks for your reply. I'm trying below steps:
import SimpleSchema from 'simpl-schema';
const PersonSchema = new SimpleSchema({
name: {
type: String,
min: 3,
max: 50
},
age: {
type: Number,
min: 0,
max: 150
}
});
const PostSchema = new SimpleSchema({
category: {
type: String,
allowedValues: [
"news",
"image",
"video"
]
},
authors: {
type: [PersonSchema],
minCount: 1,
maxCount: 3
},
publishedDate: {
type: Date
},
published: {
type: Boolean,
optional: true
}
});
export default PostSchema;
import React from 'react';
import {render} from 'react-dom';
import {AutoForm} from 'uniforms-bootstrap3';
import PostSchema from './schema.js';
const PostCreateForm = () =>
<AutoForm schema={PostSchema} onSubmit={doc => console.log(doc)} />
;
export default PostCreateForm; But unfortunately when I run my project I give the below error as output:
|
That's a bug. I've found a solution to suppress Meteor's warning about a not found module. It's here. It looks like it broke non-meteor package resolvers... OK, I'll try to fix it. |
I've made a separate issue for it: #150. |
It's fixed in |
@radekmie thanks for your rapid fix! You are hero 😉 |
Got the exact same bug using webpack and uniforms v1.15.0 and simpl-schema v0.2.3 |
@Astroxslurg what is the problem exactly? |
Well, I did pretty much exactly the same as OP, and got exactly the same error. I'm not in any trouble tho', because I'm just working on a small project atm and I solved my problem using standard HTML after I got stuck with Uniforms. But I thought I could mention the bug in case it were of any interest :) |
Thank you for your time then. I'll get to it in a minute and let you know what's going on. |
Great! :) |
create-react-app reproduction
cd reproduction
npm i -S simpl-schema uniforms{,-unstyled} I see warnings from both, handlebars and |
I also get theese kind of warnings:
but also this one error:
|
It seem to be a handlebars/webpack problem. Long story short |
All right! Thanks for your time, once again, @radekmie :) |
which packege i have to update to avoid these warnings ?? |
@waheed25: which warnings? |
meteor warnings |
@waheed25: there are no Meteor warnings for a long time now - just update the uniforms package. And by the way - this issue is about non-Meteor warnings. |
it seems the warnings still appear in webpack + uniforms + uniforms-bootstrap3
when doing the following
then webpack triggers following warnings
|
Yep it is, because there's no way to hide them. There's an idea to split schemas in future releases, but definitely not in @1.x.y as it's a breaking change. |
@radekmie Is there another open ticket for this? Seems like if this is going to be fixed in 2.x it should be on someone's radar, but this ticket is closed. It would be a shame if version 2 came out without fixing this. |
I am facing the same issue (#148 (comment)). |
Not really. Nothing changed in terms of expressing dependencies, nor uniforms@2 are on the way (yet). |
Hi, I want use uniform without meteor. can you show me an example??
I am using webpack and React.js + simpl-schma
The text was updated successfully, but these errors were encountered: