Issues importing from shapeshift

I'm trying to use StringValidator from @sapphire/shapeshift but it keeps throwing this error when i start up the bot:
import { StringValidator } from '@sapphire/shapeshift';
^^^^^^^^^^^^^^^
SyntaxError: The requested module '@sapphire/shapeshift' does not provide an export named 'StringValidator'
import { StringValidator } from '@sapphire/shapeshift';
^^^^^^^^^^^^^^^
SyntaxError: The requested module '@sapphire/shapeshift' does not provide an export named 'StringValidator'
Code:
import { StringValidator } from '@sapphire/shapeshift';
const validator = new StringValidator().url({ allowedDomains: ['youtube.com'] }).run(url);
import { StringValidator } from '@sapphire/shapeshift';
const validator = new StringValidator().url({ allowedDomains: ['youtube.com'] }).run(url);
Solution:
You're supposed to do s.string.url(...), importing s from the package.
Jump to solution
2 Replies
Solution
kyra
kyra17mo ago
You're supposed to do s.string.url(...), importing s from the package.
Frozn
Frozn17mo ago
ohh thank you
Want results from more Discord servers?
Add your server