Skip to content
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

Uncaught TypeError: (0 , _superstruct.string) is not a function #745

Open
arslion opened this issue Apr 10, 2021 · 1 comment
Open

Uncaught TypeError: (0 , _superstruct.string) is not a function #745

arslion opened this issue Apr 10, 2021 · 1 comment

Comments

@arslion
Copy link

arslion commented Apr 10, 2021

I try to execute this validate example: https://docs.superstructjs.org/guides/02-validating-data#primitive-values

import { string } from 'superstruct'

const Struct = string()

assert('a string', Struct) // passes
assert(42, Struct) // throws!

and got this error.

File.jsx:11 Uncaught TypeError: (0 , _superstruct.string) is not a function
    at Form (File.jsx:11)
    at renderWithHooks (react-dom.development.js:14803)
    at mountIndeterminateComponent (react-dom.development.js:17482)
    at beginWork (react-dom.development.js:18596)
    at HTMLUnknownElement.callCallback (react-dom.development.js:188)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:237)
    at invokeGuardedCallback (react-dom.development.js:292)
    at beginWork$1 (react-dom.development.js:23203)
    at performUnitOfWork (react-dom.development.js:22154)
    at workLoopSync (react-dom.development.js:22130)
@stonecrafter
Copy link

Same issue.... the suggestion in #612 doesn't seem to work for me...

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