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 on import / build, regression since 1.9.5

See original GitHub issue

Expected behavior

import interactjs, no exceptions thrown

Actual behavior

exception is thrown

System configuration

interact.js version: 1.9.5-1.9.7 are broken, works in 1.9.4 Browser name and version: any Operating System: any

https://github.com/msand/next-interactjs/blob/629c1da5a669a4fe56ed494a9a76d98a32adc8d3/pages/index.js#L1-L5

next-interactjs/pages/index.js

import interact from "interactjs";

const Home = () => <p>Test interact import</p>;

export default Home;

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
msandcommented, Mar 24, 2020

This seems to work without crashing

import '@interactjs/actions/use'
import '@interactjs/auto-start/use'
import '@interactjs/modifiers/use'
import '@interactjs/dev-tools/use'

import interact from '@interactjs/interact'

const Home = () => <p>Test interact import</p>;

export default Home;

Adding

import '@interactjs/inertia/use'

causes:

TypeError: Cannot read property 'prototype' of undefined
    at Object.install (/Users/msand/git/next-interactjs/.next/server/static/development/pages/index.js:7344:23)
    at Scope.usePlugin (/Users/msand/git/next-interactjs/.next/server/static/development/pages/index.js:4858:14)
    at Object.install (/Users/msand/git/next-interactjs/.next/server/static/development/pages/index.js:5196:9)
    at Scope.usePlugin (/Users/msand/git/next-interactjs/.next/server/static/development/pages/index.js:4858:14)
    at Function.use (/Users/msand/git/next-interactjs/.next/server/static/development/pages/index.js:2834:16)
    at Module../node_modules/@interactjs/inertia/use/index.js (/Users/msand/git/next-interactjs/.next/server/static/development/pages/index.js:5595:60)
import '@interactjs/actions/use'
import '@interactjs/auto-start/use'
import '@interactjs/modifiers/use'
import '@interactjs/dev-tools/use'

import '@interactjs/interact'
import interact from "interactjs";

const Home = () => <p>Test interact import</p>;

export default Home;

Causes:

TypeError: Cannot read property 'docEvents' of undefined
    at Object.__install_25 [as install] (/Users/msand/git/next-interactjs/.next/server/static/development/pages/index.js:8852:20)
    at Scope.usePlugin (/Users/msand/git/next-interactjs/.next/server/static/development/pages/index.js:8533:2745)
    at Function.use (/Users/msand/git/next-interactjs/.next/server/static/development/pages/index.js:8583:92)
    at /Users/msand/git/next-interactjs/.next/server/static/development/pages/index.js:9272:3533
    at /Users/msand/git/next-interactjs/.next/server/static/development/pages/index.js:8447:38
    at Object../node_modules/interactjs/dist/interact.min.js (/Users/msand/git/next-interactjs/.next/server/static/development/pages/index.js:8447:60)
    at __webpack_require__ (/Users/msand/git/next-interactjs/.next/server/static/development/pages/index.js:23:31)
    at Module../pages/index.js (/Users/msand/git/next-interactjs/.next/server/static/development/pages/index.js:9302:68)

Specifically due to removing the init method from the @interactjs/interactjs/index.ts file in the #800 tree shaking work https://github.com/taye/interact.js/blob/d9db69d6c8f21d6d49856420b42a0986d8d74989/%40interactjs/interactjs/index.ts

0reactions
stahlmanDesigncommented, Apr 22, 2020

Thanks, I can confirm the fix works

Read more comments on GitHub >

github_iconTop Results From Across the Web

1.0.10 -> 1.1 regression: EnvCommandError: 'No module ...
I get the exact same error when building a docker image based on python:3.9.7-alpine3.14 . I ended up exporting to a requirements file...
Read more >
How to fix "The import org.mockito cannot be resolved"?
In Project, Go to: Build Path --> Configuration Path,. In Java Build Path, Go to: Source. In both directories src/test/java and ...
Read more >
553623 – Generics Compiler regression in 1.9.5 - Bugs - Eclipse
When compiling with AJC 1.9.5 we now see this error: [ERROR] Failed to execute goal com.nickwongdev:aspectj-maven-plugin:1.12.1:compile (default) on project ...
Read more >
Bug listing with status RESOLVED with resolution FIXED as at ...
Bug :2 - "How do I attach an ebuild. ... Bug:77 - "GnuCash Will not run after merge" status:RESOLVED resolution:FIXED severity:major · Bug:78...
Read more >
Regression Metrics for Machine Learning
In this tutorial, you will discover how to calculate error metrics for regression predictive modeling projects. After completing this ...
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