

Next.jsのプロジェクトを始め、ヘッドレスCMSのSanity.ioのセットアップを問題なく終えました。  
プロジェクトのディレクトリに移動して、yarn devコマンドを実行すると以下のエラーが発生します。

[code]

    Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
        at renderElement (~/Documents/portfolio-main/sanity/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:6047:9)
        at renderNodeDestructiveImpl (~/Documents/portfolio-main/sanity/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:6108:11)
        at renderNodeDestructive (~/Documents/portfolio-main/sanity/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:6080:14)
        at retryTask (~/Documents/portfolio-main/sanity/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:6532:5)
        at performWork (~/Documents/portfolio-main/sanity/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:6580:7)
        at ~/Documents/portfolio-main/sanity/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:6904:12
        at scheduleWork (~/Documents/portfolio-main/sanity/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:78:3)
        at startWork (~/Documents/portfolio-main/sanity/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:6903:3)
        at renderToStringImpl (~/Documents/portfolio-main/sanity/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:6977:3)
        at Object.renderToStaticMarkup (~/Documents/portfolio-main/sanity/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js:7069:10)
    error Command failed with exit code 1.
    
[/code]


CC BY-SA 4.0
2023-01-31T18:16:04.417
93643
2023-02-01T05:05:40.210
2023-02-01T05:05:36.800
3060
56516
question
next.js yarn cms
sanity error： I got an error with this command