sethsandaru / vue-form-builder

Super Form Builder built on top of Vue with Drag & Drop functionality, savable-form-schema and easy to maintain/upgrade your form.
http://vue-form-builder.sethphat.com
MIT License
413 stars 129 forks source link

TypeError: _.accessStr is not a function #7

Closed tanhs closed 5 years ago

tanhs commented 5 years ago

I am getting this error when I run the try this code app.js:62950 TypeError: _.accessStr is not a function at Object.Hooks.push (hook_lists.js?fe07:38) at Object.ValidateSettingHandler.init (validate_setting_handler.js?572f:6) at VueComponent.created (FormBuilder.vue?cfcd:163) at callHook (app.js:64130) at VueComponent.Vue._init (app.js:65839) at new VueComponent (app.js:66007) at createComponentInstanceForVnode (app.js:65519) at init (app.js:65340) at createComponent (app.js:66817) at createElm (app.js:66764)

<template>
    <div>
        // form builder template
        <form-builder type="template"></form-builder>

        // form builder gui
        <form-builder type="gui" ></form-builder>
    </div>
</template>

<script>
    export default {
      data() {
        return {
          hello: 'Hello World!'
        }
      }

    }
</script>
<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
    <head>
        <!-- Fonts -->
        <link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet" type="text/css">
        <link rel="stylesheet" type="text/css" href="css/app.css">
    </head>
    <body>
            <div id="app">
                <test></test>
            </div>
            <script type="text/javascript" src="js/app.js"></script>
    </body>
</html>
tanhs commented 5 years ago

This is my package.json

{
  "_from": "v-form-builder",
  "_id": "v-form-builder@1.3.0",
  "_inBundle": false,
  "_integrity": "sha512-ngIT+QW//w1Dq4VMwTR1GVHxJrJtmZpgUPD5Zu9+WEDCEEiQzNOnC6oD1WXvXUwqFUaats8O4jsZgab/lOd28g==",
  "_location": "/v-form-builder",
  "_phantomChildren": {},
  "_requested": {
    "type": "tag",
    "registry": true,
    "raw": "v-form-builder",
    "name": "v-form-builder",
    "escapedName": "v-form-builder",
    "rawSpec": "",
    "saveSpec": null,
    "fetchSpec": "latest"
  },
  "_requiredBy": [
    "#USER",
    "/"
  ],
  "_resolved": "https://registry.npmjs.org/v-form-builder/-/v-form-builder-1.3.0.tgz",
  "_shasum": "8eea81ccb6fa98d09184a499d4006504ba301af3",
  "_spec": "v-form-builder",
  "_where": "c:\\xampp\\htdocs\\dyform",
  "author": {
    "name": "Phat Tran",
    "email": "phattranminh96@gmail.com",
    "url": "https://sethphat.com"
  },
  "bugs": {
    "url": "https://github.com/sethsandaru/vue-form-builder/issues"
  },
  "bundleDependencies": false,
  "dependencies": {
    "@fortawesome/fontawesome-svg-core": "^1.2.4",
    "@fortawesome/free-solid-svg-icons": "^5.3.1",
    "@fortawesome/vue-fontawesome": "^0.1.1",
    "bootstrap": "^4.1.3",
    "jquery": "^3.3.1",
    "moment": "^2.22.2",
    "popper.js": "^1.14.4",
    "select2": "^4.0.6-rc.1",
    "underscore": "^1.9.1",
    "underscore-deep-extend": "^1.1.5",
    "webpack-jquery-ui": "^2.0.1"
  },
  "deprecated": false,
  "description": "A Super Form Builder (drag & drop) build with VueJS by Seth Phat",
  "devDependencies": {
    "babel-core": "^6.26.0",
    "babel-loader": "^7.1.2",
    "babel-preset-env": "^1.6.0",
    "babel-preset-stage-3": "^6.24.1",
    "cross-env": "^5.0.5",
    "css-loader": "^0.28.7",
    "file-loader": "^1.1.4",
    "rimraf": "^2.6.2",
    "url-loader": "^1.1.1",
    "vue": "^2.5.17",
    "vue-loader": "^13.0.5",
    "vue-template-compiler": "^2.4.4",
    "webpack": "^3.6.0",
    "webpack-bundle-analyzer": "^3.0.2",
    "webpack-dev-server": "^2.9.1",
    "webpack-merge": "^4.1.4"
  },
  "homepage": "https://github.com/sethsandaru/vue-form-builder",
  "keywords": [
    "vue",
    "vuejs",
    "form builder",
    "drag & drop",
    "seth phat"
  ],
  "license": "MIT",
  "main": "dist/vue-form-builder.min.js",
  "name": "v-form-builder",
  "private": false,
  "repository": {
    "type": "git",
    "url": "git+https://github.com/sethsandaru/vue-form-builder.git"
  },
  "scripts": {
    "build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
    "build-bundle": "rimraf ./dist && webpack --config ./webpack.config.js",
    "build-dev": "cross-env NODE_ENV=development webpack --progress --hide-modules",
    "dev": "webpack -d --watch",
    "test": "webpack --json > stats.json"
  },
  "version": "1.3.0"
}
ranawatsuyash commented 5 years ago

were you able to resolve this issue?

sethsandaru commented 5 years ago

were you able to resolve this issue?

No, I never got this issue/error. I'm always using it fine for every built. This problem, I think somehow your code do something and cost my Vue Form Builder initialize function stop/not running before create the Form. I think I'm gonna close it at here. If in the future there are many people got this issue again. I'll open & resolve it. Thanks.

V-Orbit commented 4 years ago

we also have this issue. how we can solve it?

frizikk commented 4 years ago

For me also occurred that problem. In my application I use lodash and assign it to window._ and @sethsandaru used window._ to import lib underscore

calazcano commented 4 years ago

I have the same error using the "v-form-builder" version: "^ 1.4.1-rc2",

abhimanusharma commented 4 years ago

Why this issue is marked as closed? I have installed this package in an existing project and getting this error. Release date of Version 2.0.0 has not been announced yet. CSS of this project not loading correctly. Documentation of version 1.4.x is incomplete and not user friendly for beginners.