react-tv icon indicating copy to clipboard operation
react-tv copied to clipboard

Plugin/Preset files are not allowed to export objects, only functions. In ${filepath}

Open Maneeshashokan opened this issue 7 years ago • 2 comments

webpack-dev-server --progress --colors

/home/maneesh/source/IPS-React/node_modules/@babel/core/lib/config/config-descriptors.js:138 throw new Error(Plugin/Preset files are not allowed to export objects, only functions. In ${filepath}); ^

Error: Plugin/Preset files are not allowed to export objects, only functions. In /home/maneesh/source/IPS-React/node_modules/babel-preset-react/lib/index.js at createDescriptor (/home/maneesh/source/IPS-React/node_modules/@babel/core/lib/config/config-descriptors.js:138:11) at items.map (/home/maneesh/source/IPS-React/node_modules/@babel/core/lib/config/config-descriptors.js:69:50) at Array.map () at createDescriptors (/home/maneesh/source/IPS-React/node_modules/@babel/core/lib/config/config-descriptors.js:69:29) at createPresetDescriptors (/home/maneesh/source/IPS-React/node_modules/@babel/core/lib/config/config-descriptors.js:61:10) at presets (/home/maneesh/source/IPS-React/node_modules/@babel/core/lib/config/config-descriptors.js:43:19) at mergeChainOpts (/home/maneesh/source/IPS-React/node_modules/@babel/core/lib/config/config-chain.js:304:26) at /home/maneesh/source/IPS-React/node_modules/@babel/core/lib/config/config-chain.js:267:7 at buildRootChain (/home/maneesh/source/IPS-React/node_modules/@babel/core/lib/config/config-chain.js:114:22) at loadPrivatePartialConfig (/home/maneesh/source/IPS-React/node_modules/@babel/core/lib/config/partial.js:55:55) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] react-tv-start: webpack-dev-server --progress --colors npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] react-tv-start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/maneesh/.npm/_logs/2018-05-31T03_46_23_111Z-debug.log

package.json { "private": true, "react-tv": { "files": [ "index.html", "bundle.js", "style.css" ] }, "dependencies": { "react": "^16.2.0", "react-dom": "^16.2.0", "react-native": "0.55.4", "react-scripts": "1.1.4" }, "scripts": { "react-tv-cli": "react-tv-cli", "start": "react-scripts start", "build": "webpack", "build-prod": "cross-env NODE_ENV=production yarn build", "run-webos": "yarn build-prod && react-tv-cli run-webos", "test": "react-scripts test --env=jsdom", "eject": "react-scripts eject", "native-start": "node node_modules/react-native/local-cli/cli.js start", "react-tv-start": "webpack-dev-server --progress --colors" }, "devDependencies": { "babel-jest": "23.0.0", "babel-preset-react-native": "4.0.0", "jest": "23.0.0", "react-test-renderer": "16.3.1", "babel-core": "^6.26.0", "babel-loader": "^7.1.2", "babel-polyfill": "^6.26.0", "babel-preset-env": "^1.6.1", "babel-preset-react": "^6.24.1", "cross-env": "^5.1.1", "react": "^16.2.0", "react-tv": "^0.3.4", "react-tv-cli": "^0.3.4", "react-tv-navigation": "^0.4.0", "webpack": "^3.8.1", "webpack-dev-server": "^2.9.4" }, "jest": { "preset": "react-native" } }

.babelrc { "presets": [ "env", "react" ] }

I am trying to combine react-native code and react-tv code, but am getting this error while running react-tv app.

Maneeshashokan avatar May 31 '18 03:05 Maneeshashokan

Yo @Maneeshashokan! Why you're trying to combine react-native and react-tv code?

Seems to be an issue with babel configuration.

raphamorim avatar Jun 03 '18 20:06 raphamorim

@raphamorim these three projects are same, so I can share my reducers and actions for all these. That's why I decided to combine these three. Is it possible to do this?

Maneeshashokan avatar Jun 04 '18 07:06 Maneeshashokan