shenyu icon indicating copy to clipboard operation
shenyu copied to clipboard

[BUG] shenyu-dashboard index error

Open dbaxyx opened this issue 5 years ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Current Behavior

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.

Expected Behavior

No response

Steps To Reproduce

1、npm install --save-dev --force --registry=https://registry.npm.taobao.org 2、npm run start 3、chrome redirect to index 4、the page says some error,the error info :

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.

Environment

ShenYu version(s):2.4.1-SNAPSHOT
Node version:v13.14.0


React Info:


[email protected] | MIT | deps: 2 | versions: 617
React is a JavaScript library for building user interfaces.
https://reactjs.org/

keywords: react

dist
.tarball: https://registry.npmjs.org/react/-/react-17.0.2.tgz
.shasum: d0b5cc516d29eb3eee383f75b62864cfb6800037
.integrity: sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==
.unpackedSize: 291.1 kB

dependencies:
loose-envify: ^1.1.0  object-assign: ^4.1.1 

maintainers:
- sebmarkbage <[email protected]>
- gaearon <[email protected]>
- acdlite <[email protected]>
- brianvaughn <[email protected]>
- fb <[email protected]>
- trueadm <[email protected]>
- sophiebits <[email protected]>
- lunaruan <[email protected]>

dist-tags:
alpha: 18.0.0-alpha-b1a1cb116-20210924               latest: 17.0.2                                       
experimental: 0.0.0-experimental-b1a1cb116-20210924  next: 18.0.0-alpha-b1a1cb116-20210924                

published 6 months ago by gaearon <[email protected]>

Debug logs

No response

Anything else?

No response

dbaxyx avatar Sep 27 '21 09:09 dbaxyx

@dbaxyx Hello,I'm confused why your react's version is @17.0.2 while it's "react": "^16.4.1", in package.json. Or do you have a custom modification code?

Maybe you can try to remove the node_moudule and rebuild it.

# install dependencies in this project root path.
npm install
# run
npm start

if it does not work,you can provide more detailed information to help us locate the problem.

fengzhenbing avatar Sep 27 '21 16:09 fengzhenbing

Hi, does this question still exist? If there is still a problem, please resubmit the issue.

midnight2104 avatar Feb 20 '22 13:02 midnight2104