using autoForm/quickForm, returns Objects instead of an html form - meteor-autoform

I'm trying to use quickForm form autoForm to generate a form from my collection
<template name="NewRecipe">
<div class="new-recipe-container">
{{> quickForm collection="Recipes" id="insertRecipeForm" type="insert" class="new-recipe-form"}}
</div>
</template>
Instead of displaying a simple table with labels and input fields and a submit button what it returns is an array of objects, they appear as
[object Object]
[object Object]
[object Object]
[object Object]
Submit
The button renders as a button, but the fields on my schema are not.

Switch to an older version, current version is 1.5.0. Need to use 1.4.3.
Here's the command:
cd [to your project]
meteor npm install --save simpl-schema#1.4.3

First uninstall older simpl-schema
meteor npm uninstall --save simpl-schema
then downgrade simpl-schema 1.5.0 to 1.4.0
meteor npm install --save simpl-schema#1.4.3
It works for me.

Related

Unable to render Reactjs-boostrap popover

I have the following package installed:
npm install --save react-bootstrap bootstrap
And I am trying to add a popover using an example provided here example.
This is the exact code:
import React from 'react';
import 'bootstrap/dist/css/bootstrap.min.css';
import Popover from 'react-bootstrap/Popover';
import OverlayTrigger from 'react-bootstrap/OverlayTrigger';
import Button from 'react-bootstrap/Button';
function App() {
const popover = (
<Popover id="popover-basic">
<Popover.Title as="h3">Popover title</Popover.Title>
<Popover.Content>
Popover content <strong>some strong content</strong> Normal content again
</Popover.Content>
</Popover>
);
return (
<div className="App">
<OverlayTrigger trigger="click" placement="right" overlay={popover}>
<Button variant="success">Click to trigger popover</Button>
</OverlayTrigger>
</div>
);
}
export default App;
But it just doesn't work. I don't see any errors in the console. And the popover does not render at all. What am I missing?
Probably you just need npm install react-bootstrap bootstrap. That is mentioned on the doc you suggested too.
From this Article,
Before npm 5.0.0, it was necessary to add --save after package name because it
will save the installed package to package.json file in the dependency section.
If you are using a recent version of npm save yourself from unnecessary typing
and use npm install [Package Name] instead of npm install [Package Name] --save
by default it will add the installed package to the dependency list in the
package.json file.

createBrowserApp is not working with react-navigation v5

with new react-navigation v5 it's become impossible to use it with react-native-web.
just importing createBrowserApp throws an error
import {createBrowserApp} from "#react-navigation/web";
show following error in #react-navigation/web/dist/Link.js
TypeError: (0 , _core.withNavigation) is not a function
does anybody know how to use now react-navigation v5 with react-native-web? I need url history in path, but now it has became impossible.
expo install react-navigation react-native-gesture-handler react-native-reanimated react-native-screens
npm i react-navigation-stack
npm i #react-navigation/web
install with expo that is why expo would look for the correct version of the react–navigation libraries that’d work with the expo version that’s installed in your project.
and keep with this tutorial
https://codersera.com/blog/how-to-do-navigation-in-react-native-web-in-2020/

Ionicons not showing after npm installation

I installed ionicons using npm install --save ionicons so that my package.json updated to:
"dependencies": {
"ionicons": "^3.0.0"
}
Next, I added the following in my /resources/assets/sass/app.scss:
// Ionicons
#import "node_modules/ionicons/dist/scss/ionicons";
After successfully running npm run dev, I ended up with
/public
/css
app.css
/fonts
/vendor
/ionicons
/dist
ionicons.eot
ionicons.svg
ionicons.ttf
ionicons.woff
ionicons.woff2
With no errors in the browser console, not a single ionicon (e.g. <i class="icon ion-home"></i>) is showing. I inspected public/css/app.css, and found that it references ionic fonts like so: /fonts/vendor/ionicons/dist/ionicons, which seems to comply with the folder structure above.
I tried adjusting #import, changing url(...) refrences in app.css, moving fonts directory - no luck. Lastly, I tried to reference ionicons through a CDN, and it worked like charm.
What am I doing wrong here? Thanks
It turns out that I was using the docs for the wrong version of ionicons:
v2.0.0 ionicons.com
v3.0.0 ionicframework.com/docs/ionicons
If you install ionicons with NPM as I did, you'll get the latest version; if you clone them from their github repository, you'll get v2.0.0. It turns out that in v3.0.0, many icon classes were removed/changed, hence I couldn't see <i class="icon ion-home"></i>, what a waste of time!
Paste these two lines right before your tag:
<script type="module" src="https://unpkg.com/ionicons#5.5.2/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/ionicons#5.5.2/dist/ionicons/ionicons.js"></script>
Uninstall ionicon from your depencency:
npm uninstall ionicons
For anyone else facing this issue. This is what fixed it for me :slight_smile:
npm uninstall ionicons
npm install ionicons
when you install the package
add this command : ng add #ionic/angular
Now the Ionicons has been updated to v4.x. (Answer written at 2019-06-24)
Try like this:
Before import the scss after install, set the value of $ionicons-font-path:
$ionicons-font-path: "~ionicons/dist/fonts";
#import '~ionicons/dist/scss/ionicons.scss';
When use the icon tag, write in ion-icon tag:
<ion-icon name="add"></ion-icon>

CSS Transition Group Issue when installing React Fine Uploader

I'm trying to get a fresh react fine uploader going but keep running into issues with react-addons-css-transition-group.
The warning I'm getting is:
npm WARN react-fine-uploader#1.0.1 requires a peer of
react-addons-css-transition-group#0.14.x || 15.x.x but none was
installed.
I've installed the latest version of React i.e. 15.5.4 and according to this page, the react-addons-css-transition-group has been deprecated.
https://www.npmjs.com/package/react-addons-css-transition-group
How do I resolve this issue?
P.S. This is my package.json file as it stands right now.

React Native _weakMap2 error

I just updated to React Native 0.21, but I am getting an error when I require Parse:
var Parse = require('parse/react-native').Parse;
The error I get is:
undefined is not a constructor (evaluating 'new _weakMap2.default()')
I don't believe it has to do with Parse though, as searching the directory, the 'weakMap2' reference is only found inside the react-proxy package.
Has anyone else experienced this error or found a workaround? Thanks!
This should be fixed in react-proxy#1.1.7.
(Don’t use 2.x, it’s not related to React Native at all currently!)
You can run npm install react-proxy#1.1.7 so NPM updates it locally. If you are using npm#2.x, you would need to run npm install react-proxy#1.1.7 inside node_modules/react-native/node_modules/react-transform-hmr or something like this—check where it is installed and make sure it’s 1.x but up to date.
Don't really know the issue but running Parse JS SDK as version 1.6.14 works for me. Have the same error as you when running latest 1.7.1. Hard to trace the error.
npm i parse#1.6.14 --save
I forced react-proxy to version 2.0.1 and the error is now gone for me.

Resources