Skip to content

TypeError: _globals__WEBPACK_IMPORTED_MODULE_0__.willAdvance is not a function #1107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hazem3500 opened this issue Aug 4, 2020 · 1 comment

Comments

@hazem3500
Copy link
Member

🐛 Bug Report

Am using react-spring inside storybook, it works fine when am running development, but after build it gives me the error TypeError: _globals__WEBPACK_IMPORTED_MODULE_0__.willAdvance is not a function

To Reproduce

run npx -p @storybook/cli sb init --type react in an empty directory
run npm i react-spring@next --save
create stories/test.stories.tsx with the code

import React from 'react';
import { useSpring, animated } from 'react-spring';

export default {
    title: 'test'
}

export const test= () => {
    const props = useSpring({
        from: {
            opacity: 0,
        },
        to: {
            opacity: 1,
        },
        loop: { reverse: true },
    });
    return <animated.h1 style={props}>test</animated.h1>;
};

run npm run build-storybook
run npx http-server storybook-static
open the test story
you'll see the TypeError: _globals__WEBPACK_IMPORTED_MODULE_0__.willAdvance is not a function in the console and the animation won't be working

I've tried using react spring v8 and it didn't seem to break but when using v9 it seems to throw this error

Expected behavior

The animation should work properly without any error in the console

Environment

  • react-spring v9.0.0-rc.3
  • react v16.13.1
@aleclarson
Copy link
Contributor

Seems like a duplicate of #1078

This will be fixed in the next RC version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants