question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

babel.loadPartialConfigSync is not a function

See original GitHub issue

Describe the bug

I have upgraded react-scripts package to latest 5.0.0. While running ‘npm run build’ got following error:

src/store.js
  Line 0:  Parsing error: babel.loadPartialConfigSync is not a function


npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-app@0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-app@0.1.0 build 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:

Did you try recovering your dependencies?

#npm --version
6.14.15

Which terms did you search for in User Guide?

(Write your answer here if relevant.)

Environment

# npm --version
6.14.15
# npx create-react-app --info
npx: installed 67 in 4.61s

Environment Info:

  current version of create-react-app: 5.0.0
  running from /root/.npm/_npx/18603/lib/node_modules/create-react-app

  System:
    OS: Linux 4.18 CentOS Linux 8
    CPU: (2) x64 AMD EPYC 7571
  Binaries:
    Node: 14.17.1 - ~/.nvm/versions/node/v14.17.1/bin/node
    Yarn: Not Found
    npm: 6.14.15 - ~/.nvm/versions/node/v14.17.1/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: Not Found
  npmPackages:
    react: ^16.13.1 => 16.14.0 (0.14.10, 15.7.0, 0.9.0)
    react-dom: ^16.13.1 => 16.14.0
    react-scripts: 5.0.0 => 5.0.0
  npmGlobalPackages:
    create-react-app: Not Found

Steps to reproduce

(Write your steps here:)

Expected behavior

(Write what you thought would happen.)

Actual behavior

(Write what happened. Please add screenshots!)

Reproducible demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:8
  • Comments:9

github_iconTop GitHub Comments

12reactions
ruslanzakhcommented, Jan 28, 2022

Have the same problem.

4reactions
tarumamcommented, Apr 12, 2022

Guys… that worked for me: 1 - installed the latest @babel/core then my error changed to: This experimental syntax requires enabling one of the following parser plugin(s): "jsx", "flow", "typescript".

2 - Updated my babel.config.js

module.exports = {
  presets: ["@babel/preset-env", "@babel/preset-react"],
};

3 - On ESLint Config:

 parser: @babel/eslint-parser,
Read more comments on GitHub >

github_iconTop Results From Across the Web

Newest 'babel-loader' Questions - Stack Overflow
loadPartialConfigSync is not a function. Getting this error in React js. Tried to update the babel and change the babel.config file but didn't...
Read more >
parsing error babel.loadpartialconfigsync is not a function eslint
解决eslint 的Parsing error: Unexpected token 错误问题描述:import动态导入,将js文件单独打包时,webpack打包错误问题分析:禁用eslint, 1. 评论
Read more >
Package Diff: @babel/core @ 7.7.7 .. 7.8.0
Visual diff of the npm package '@babel/core' comparing 7.7.7 with 7.8.0. ... async cache handler, ` + `which your current version of Babel...
Read more >
"Fossies" - the Fresh Open Source Software Archive
babelParserPlugins ]; 21 } 22 23 function normalizeParserOptions(options) { 24 ... a .babelrc.js file or use package.json#babel, keep in mind that it's not...
Read more >
dynamic import can only be supported when transforming es ...
Every time I run the babel CLI, or when SublimeLinter runs eslint (or I run it ... toBuffer is not exported by node-resolve:empty.js...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found