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.

Error: Couldn't find intersection

See original GitHub issue

Describe the bug

After updating to 0.5, I started getting these errors…

Stack Trace

./node_modules/regenerator-runtime/runtime-module.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Couldn't find intersection



  Error: Child compilation failed:
  Module build failed (from ./node_modules/babel-loader/lib/index.js):
  Error: Couldn't find intersection
  
  - ancestry.js:153 NodePath.getDeepestCommonAncestorFrom
    [app]/[@babel]/traverse/lib/path/ancestry.js:153:11
  
  - index.js:244 getSegmentedSubPaths
    [app]/[babel-plugin-minify-builtins]/lib/index.js:244:14
  
  - index.js:92 BuiltInReplacer.replace
    [app]/[babel-plugin-minify-builtins]/lib/index.js:92:31
  
  - index.js:205 PluginPass.exit
    [app]/[babel-plugin-minify-builtins]/lib/index.js:205:27
  
  - visitors.js:193 newFn
    [app]/[@babel]/traverse/lib/visitors.js:193:21
  
  - context.js:53 NodePath._call
    [app]/[@babel]/traverse/lib/path/context.js:53:20
  
  - context.js:40 NodePath.call
    [app]/[@babel]/traverse/lib/path/context.js:40:17
  
  - context.js:97 NodePath.visit
    [app]/[@babel]/traverse/lib/path/context.js:97:8
  
  - context.js:118 TraversalContext.visitQueue
    [app]/[@babel]/traverse/lib/context.js:118:16
  
  - context.js:90 TraversalContext.visitSingle
    [app]/[@babel]/traverse/lib/context.js:90:19
  
  - context.js:146 TraversalContext.visit
    [app]/[@babel]/traverse/lib/context.js:146:19
  
  - index.js:94 Function.traverse.node
    [app]/[@babel]/traverse/lib/index.js:94:17
  
  - index.js:76 traverse
    [app]/[@babel]/traverse/lib/index.js:76:12
  
  - index.js:88 transformFile
    [app]/[@babel]/core/lib/transformation/index.js:88:29
  
  - index.js:45 runSync
    [app]/[@babel]/core/lib/transformation/index.js:45:3

Configuration

babel-minify preset in babel config

babel-minify version: 0.5.0

babel version : 7.1.0

babel-minify-config:

loader: require.resolve('babel-loader'),
options: {
	babelrc: false,
	sourceType: 'unambiguous',
	compact: PROD,
	presets: [
		require.resolve('./babel.config.js'),
		[require.resolve('babel-preset-minify'), {
			mangle: false,
			deadcode: false,
			// simplify: false,
			evaluate: false,
		}]
	]
}

babelrc:

{
    sourceType: 'unambiguous',
    compact: false,
    presets: [
        ['@babel/preset-env', {
            shippedProposals: true,
            targets: [
                '> 1% in US',
                'last 2 versions',
                'not dead',
            ]
        }],
        '@babel/preset-flow',
        '@babel/preset-react',
    ],
    plugins: [
        '@babel/plugin-transform-runtime',
        ['@babel/plugin-proposal-decorators', { legacy: true }],
        ['@babel/plugin-proposal-class-properties', { loose: true }],
        '@babel/plugin-proposal-export-default-from',
        '@babel/plugin-proposal-export-namespace-from',
        '@babel/plugin-syntax-dynamic-import'
    ]
}

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:51
  • Comments:35

github_iconTop GitHub Comments

75reactions
goozlercommented, Sep 25, 2018

I have the same versions of libs and I had the same issue. Disabling builtIns helped me. I have these options now:

['minify', {
  builtIns: false,
  evaluate: false,
  mangle: false,
}],

It’s like a temporary fix

23reactions
fatlard1993commented, Feb 19, 2019

Same issue here. Changing 'minify' to ['minify', { builtIns: false }] as @goozler suggested worked for me for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Babel - Bountysource
node_modules/babel-loader/lib/index.js): Error: Couldn't find intersection Error: Child compilation failed: Module build failed (from .
Read more >
Webpack + Babel: Couldn't find preset "es2015" relative to ...
I think the point here is that Alex had a .babelrc in their home directory (not the project directory) and it was conflicting...
Read more >
babel-preset-minify - npm
Babel preset for all minify plugins.. Latest version: 0.5.2, last published: 8 months ago. Start using babel-preset-minify in your project ...
Read more >
TF1 intersection - ROOT Forum
The problem is that I tried in many ways to use the same method of the example above but couldn't find any way...
Read more >
Identifying self-intersections in LineString using shapely
However, I couldn't find a way to identify: self-intersection points/ node number; the number of intersections. Are there any methods apart from ...
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