Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/sharepoint/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reactjs 元素类型无效:生成Web包后应为字符串(用于内置组件)或类/函数_Reactjs_Webpack_Node Modules_Storybook_Lerna - Fatal编程技术网

Reactjs 元素类型无效:生成Web包后应为字符串(用于内置组件)或类/函数

Reactjs 元素类型无效:生成Web包后应为字符串(用于内置组件)或类/函数,reactjs,webpack,node-modules,storybook,lerna,Reactjs,Webpack,Node Modules,Storybook,Lerna,我创建了一个简单的组件库和一本故事书作为游乐场, 为符号链接使用了Lerna引导 当我使用符号链接并呈现按钮时,此代码工作正常: import React from 'react'; import { Button } from '@ui-core/core'; export default { title: 'Button', component: Button, }; export const Emoji = () => ( <Button text=

我创建了一个简单的组件库和一本故事书作为游乐场, 为符号链接使用了Lerna引导

当我使用符号链接并呈现
按钮时,此代码工作正常:

import React from 'react';
import { Button } from '@ui-core/core';

export default {
    title: 'Button',
    component: Button,
};

export const Emoji = () => (
    <Button text={'dsad1'}>
    </Button>
);

有人知道我缺少什么吗?

发现问题,我在webpack.config
output
中缺少此属性:

libraryTarget: 'umd'

您试图渲染哪个元素?我在@ui core/core中创建的简单按钮
libraryTarget: 'umd'