ukrbublik / react-awesome-query-builder

User-friendly query builder for React
https://ukrbublik.github.io/react-awesome-query-builder
MIT License
2.01k stars 499 forks source link

Fail to import component #99

Closed GabrielMachado11 closed 5 years ago

GabrielMachado11 commented 5 years ago

Hi, i am getting below error when i try to import component in my project

Uncaught SyntaxError: Invalid or unexpected token at new Script (vm.js:74) at createScript (vm.js:246) at Object.runInThisContext (vm.js:298) at Module._compile (internal/modules/cjs/loader.js:678) at Object.Module._extensions..js (internal/modules/cjs/loader.js:722) at Module.load (internal/modules/cjs/loader.js:620) at tryModuleLoad (internal/modules/cjs/loader.js:559) at Function.Module._load (internal/modules/cjs/loader.js:551) at Module.require (internal/modules/cjs/loader.js:658) at require (internal/modules/cjs/helpers.js:20)

someone have an idea what i need to do? I already tried to add all possible loaders

GabrielMachado11 commented 5 years ago

My dependencies

"devDependencies": { "@babel/core": "7.1.6", "@babel/plugin-proposal-class-properties": "7.1.0", "@babel/plugin-proposal-decorators": "7.1.6", "@babel/plugin-proposal-do-expressions": "7.0.0", "@babel/plugin-proposal-export-default-from": "7.0.0", "@babel/plugin-proposal-export-namespace-from": "7.0.0", "@babel/plugin-proposal-function-bind": "7.0.0", "@babel/plugin-proposal-function-sent": "7.1.0", "@babel/plugin-proposal-json-strings": "7.0.0", "@babel/plugin-proposal-logical-assignment-operators": "7.0.0", "@babel/plugin-proposal-nullish-coalescing-operator": "7.0.0", "@babel/plugin-proposal-numeric-separator": "7.0.0", "@babel/plugin-proposal-optional-chaining": "7.0.0", "@babel/plugin-proposal-pipeline-operator": "7.0.0", "@babel/plugin-proposal-throw-expressions": "7.0.0", "@babel/plugin-syntax-dynamic-import": "7.0.0", "@babel/plugin-syntax-import-meta": "7.0.0", "@babel/plugin-transform-react-constant-elements": "7.0.0", "@babel/plugin-transform-react-inline-elements": "7.0.0", "@babel/preset-env": "7.1.6", "@babel/preset-flow": "7.0.0", "@babel/preset-react": "7.0.0", "@babel/register": "7.0.0", "babel-core": "7.0.0-bridge.0", "babel-eslint": "10.0.1", "babel-jest": "23.6.0", "babel-loader": "8.0.4", "babel-plugin-dev-expression": "0.2.1", "babel-plugin-transform-react-remove-prop-types": "0.4.20", "chalk": "2.4.1", "concurrently": "4.1.0", "connected-react-router": "5.0.1", "core-js": "2.6.5", "cross-env": "5.2.0", "cross-spawn": "6.0.5", "css-loader": "1.0.1", "detect-port": "1.3.0", "electron": "^3.0.10", "electron-builder": "20.34.0", "electron-devtools-installer": "2.2.4", "enzyme": "3.7.0", "enzyme-adapter-react-16": "1.7.0", "enzyme-to-json": "3.3.4", "eslint": "5.9.0", "eslint-config-airbnb": "17.1.0", "eslint-config-prettier": "3.3.0", "eslint-formatter-pretty": "2.0.0", "eslint-import-resolver-webpack": "0.10.1", "eslint-plugin-compat": "2.6.3", "eslint-plugin-flowtype": "3.2.0", "eslint-plugin-import": "2.14.0", "eslint-plugin-jest": "22.0.0", "eslint-plugin-jsx-a11y": "6.1.2", "eslint-plugin-promise": "4.0.1", "eslint-plugin-react": "7.11.1", "eslint-plugin-testcafe": "0.2.1", "fbjs-scripts": "1.0.1", "file-loader": "2.0.0", "flow-bin": "0.77.0", "flow-runtime": "0.17.0", "flow-typed": "2.5.1", "husky": "1.1.4", "identity-obj-proxy": "3.0.0", "jest": "23.6.0", "less-loader": "^5.0.0", "lint-staged": "8.1.0", "mini-css-extract-plugin": "0.4.4", "node-sass": "4.10.0", "opencollective-postinstall": "2.0.1", "optimize-css-assets-webpack-plugin": "5.0.1", "prettier": "1.15.2", "react-test-renderer": "^16.6.3", "redux-logger": "3.0.6", "rimraf": "2.6.2", "sass-loader": "7.1.0", "sinon": "7.1.1", "spectron": "5.0.0", "standard": "14.0.0", "style-loader": "0.23.1", "stylelint": "9.8.0", "stylelint-config-prettier": "4.0.0", "stylelint-config-standard": "18.2.0", "terser-webpack-plugin": "1.1.0", "testcafe": "0.23.2", "testcafe-browser-provider-electron": "0.0.6", "testcafe-live": "0.1.4", "testcafe-react-selectors": "3.0.0", "url-loader": "1.1.2", "webpack": "4.26.0", "webpack-bundle-analyzer": "3.0.3", "webpack-cli": "3.1.2", "webpack-dev-server": "3.1.10", "webpack-merge": "4.1.4", "yarn": "1.12.3" }, "dependencies": { "@fortawesome/fontawesome-free": "5.5.0", "@material-ui/core": "^3.9.2", "@material-ui/icons": "3.0.1", "@material-ui/styles": "^4.3.0", "antd": "^3.9.0", "apisauce": "1.0.3", "classnames": "^2.2.6", "devtron": "1.4.0", "electron-debug": "2.0.0", "electron-log": "2.2.17", "electron-updater": "4.0.0", "history": "4.7.2", "mui-datatables": "^2.10.2", "notistack": "^0.3.7", "react": "16.4.1", "react-awesome-query-builder": "^0.2.51", "react-dom": "16.4.1", "react-hot-loader": "4.3.12", "react-redux": "5.1.1", "react-router": "4.3.1", "react-router-dom": "4.3.1", "redux": "4.0.1", "redux-thunk": "2.3.0", "source-map-support": "0.5.9" },

johannsl commented 5 years ago

Hi, i am getting below error when i try to import component in my project

Uncaught SyntaxError: Invalid or unexpected token at new Script (vm.js:74) at createScript (vm.js:246) at Object.runInThisContext (vm.js:298) at Module._compile (internal/modules/cjs/loader.js:678) at Object.Module._extensions..js (internal/modules/cjs/loader.js:722) at Module.load (internal/modules/cjs/loader.js:620) at tryModuleLoad (internal/modules/cjs/loader.js:559) at Function.Module._load (internal/modules/cjs/loader.js:551) at Module.require (internal/modules/cjs/loader.js:658) at require (internal/modules/cjs/helpers.js:20)

someone have an idea what i need to do? I already tried to add all possible loaders

It is very hard to help you resolve your issue with the information you have provided, but it is obvious that you have a syntax error.

You should go through your code and look for gramatical errors, and possibly check your build routine to see if your code is transpiled correctly and so on.

Good luck