Skip to content

Instantly share code, notes, and snippets.

@jmaguirrei
Created July 24, 2018 22:37
Show Gist options
  • Save jmaguirrei/aeaab309fe7bf5f38629f57b34dc3fd4 to your computer and use it in GitHub Desktop.
Save jmaguirrei/aeaab309fe7bf5f38629f57b34dc3fd4 to your computer and use it in GitHub Desktop.
Nextjs Babel config Jest error
{
"presets": [
[ "next/babel", { "preset-env": { "modules": "commonjs" }} ]
],
"plugins": [
[
"module-resolver",
{
"root": [
"./"
],
"alias": {
"imports": "./imports",
"tests": "./tests",
"module": "./module",
"pages": "./pages",
"server": "./server"
}
}
]
]
}
FAIL module/api/stores/((Tags))/__tests__/myTags.test.js
● Test suite failed to run
Plugin 0 specified in "/Users/jmaguirrei/MEGA/MEGAsync/timefic/dev/v2/frontend/web-meet/node_modules/next/babel.js" provided an invalid property of "default" (While processing preset: "/Users/jmaguirrei/MEGA/MEGAsync/timefic/dev/v2/frontend/web-meet/node_modules/next/babel.js")
at Plugin.init (node_modules/babel-core/lib/transformation/plugin.js:131:13)
at Function.normalisePlugin (node_modules/babel-core/lib/transformation/file/options/option-manager.js:152:12)
at node_modules/babel-core/lib/transformation/file/options/option-manager.js:184:30
at Array.map (<anonymous>)
at Function.normalisePlugins (node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)
at OptionManager.mergeOptions (node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)
at node_modules/babel-core/lib/transformation/file/options/option-manager.js:265:14
at node_modules/babel-core/lib/transformation/file/options/option-manager.js:323:22
at Array.map (<anonymous>)
at OptionManager.resolvePresets (node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20)
{
"name": "timefic-meet",
"version": "1.0.0",
"author": "Jose Manuel Aguirre",
"license": "ISC",
"jest": {
"setupFiles": [
"<rootDir>/shim.js"
]
},
"engines": {
"node": "9.5.0"
},
"scripts": {
"dev": "NODE_ENV=development node server",
"build": "next build && next-build-id --id _timefic-0000-3030-0001-meet________",
"export": "next export",
"start": "NODE_ENV=production node server",
"analyze": "cross-env ANALYZE=1 next build",
"test": "NODE_ENV=test jest --watchAll",
"snaps": "jest -u"
},
"dependencies": {
"asteroid": "^2.0.3",
"core-js": "^2.5.1",
"cryptr": "^2.0.0",
"express": "^4.16.2",
"express-redirect": "^1.2.2",
"isomorphic-fetch": "^2.2.1",
"latinize": "^0.4.0",
"lodash": "^4.17.10",
"micro": "latest",
"mobile-detect": "^1.3.7",
"mobx": "^3.6.1",
"mobx-react": "^4.4.2",
"mobx-utils": "^3.2.2",
"moment": "^2.22.2",
"next": "^6.1.1",
"next-build-id": "^1.1.0",
"next-routes": "^1.4.2",
"paypal-checkout": "^4.0.134",
"prop-types": "^15.5.8",
"pubnub": "^4.20.2",
"react": "^16.4.1",
"react-autosize-textarea": "^0.4.9",
"react-dom": "^16.4.1",
"react-ga": "^2.3.5",
"react-no-ssr": "^1.1.0",
"react-share": "^1.16.0",
"react-spring": "^4.2.1",
"screenfull": "^3.3.2",
"simpl-schema": "^0.3.2",
"webfontloader": "^1.6.28",
"webpack-bundle-analyzer": "^2.13.1"
},
"devDependencies": {
"@babel/preset-stage-0": "^7.0.0-beta.42",
"babel-eslint": "^8.2.3",
"babel-plugin-lodash": "^3.2.11",
"babel-plugin-module-resolver": "^3.1.0",
"enzyme": "^2.9.1",
"eslint": "^4.6.1",
"eslint-plugin-react": "^7.10.0",
"fs": "0.0.1-security",
"jest": "^21.2.1",
"mobx-react-devtools": "^4.2.15",
"now-env": "^3.1.0",
"react-addons-test-utils": "^15.6.2",
"react-test-renderer": "^16.0.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment