next-plugins icon indicating copy to clipboard operation
next-plugins copied to clipboard

Error when added next-typescript to .babelrc

Open thepatrykk opened this issue 7 years ago • 1 comments

Hi, We want to add existing next application the typescript module. I did every step what is in the README, after try compile this I got an error: Module build failed: Error: .presets[0][1] must be an object, false, or undefined

I tried update the babel, babel-core to the newest version, but the error occur.

My .babelrc looks like: { "env": { "development": { "presets": ["next/babel"] }, "production": { "presets": ["next/babel"] }, "test": { "presets": [["next/babel", { "preset-env": { "modules": "commonjs" } }]] } }, "presets": [ [ "next/babel", "@zeit/next-typescript/babel", { "styled-jsx": { "plugins": [ "styled-jsx-plugin-sass" ] } } ] ] }

rest packages and version which we're using:

"node": "8.11.4"
 "@weco/next-plugin-transpile-modules": "0.0.2",
    "@zeit/next-sass": "0.2.0",
    "@zeit/next-typescript": "^1.1.1",
   "babel-core": "6.26.0",
    "babel-eslint": "7.2.3",
    "babel-loader": "7.1.2",
    "next": "6.1.1",

thepatrykk avatar Jan 04 '19 15:01 thepatrykk

Hi, thanks for creating an issue. We currently recommend using the built-in typescript support.

timneutkens avatar Dec 18 '20 07:12 timneutkens