You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dva g route users
/usr/local/lib/node_modules/dva-cli/bin/dva-generate
create routeComponent src/routes/Users.js, src/routes/Users.css
create route users with src/routes/Users.js
AssertionError [ERR_ASSERTION]: getRouterTree: component should be one of Router, Route, Redirect, IndexRedirect, IndexRoute
at parse (/usr/local/lib/node_modules/dva-cli/node_modules/dva-ast/lib/collections/Router.js:57:28)
at ret.children.node.children.filter.map.node (/usr/local/lib/node_modules/dva-cli/node_modules/dva-ast/lib/collections/Router.js:94:93)
at Array.map (native)
at parse (/usr/local/lib/node_modules/dva-cli/node_modules/dva-ast/lib/collections/Router.js:94:81)
at NodePath.simpleMap.path (/usr/local/lib/node_modules/dva-cli/node_modules/dva-ast/lib/collections/Router.js:117:13)
at NodePath. (/usr/local/lib/node_modules/dva-cli/node_modules/dva-ast/lib/collections/Helper.js:21:28)
at __paths.forEach (/usr/local/lib/node_modules/dva-cli/node_modules/jscodeshift/src/Collection.js:76:36)
at Array.forEach (native)
at Collection.forEach (/usr/local/lib/node_modules/dva-cli/node_modules/jscodeshift/src/Collection.js:75:18)
at Collection.simpleMap (/usr/local/lib/node_modules/dva-cli/node_modules/dva-ast/lib/collections/Helper.js:20:10)
Versions of packages used: (哪个库的哪个版本出现的问题)
2.0.1
The text was updated successfully, but these errors were encountered:
Code to reproduce the issue: (请提供可复现的代码或者步骤)
dva new 完项目后,执行 dva g route users,出错
Expected behavior: (预期的正常效果)
Actual behavior: (实际效果)
dva g route users
/usr/local/lib/node_modules/dva-cli/bin/dva-generate
create routeComponent src/routes/Users.js, src/routes/Users.css
create route users with src/routes/Users.js
AssertionError [ERR_ASSERTION]: getRouterTree: component should be one of Router, Route, Redirect, IndexRedirect, IndexRoute
at parse (/usr/local/lib/node_modules/dva-cli/node_modules/dva-ast/lib/collections/Router.js:57:28)
at ret.children.node.children.filter.map.node (/usr/local/lib/node_modules/dva-cli/node_modules/dva-ast/lib/collections/Router.js:94:93)
at Array.map (native)
at parse (/usr/local/lib/node_modules/dva-cli/node_modules/dva-ast/lib/collections/Router.js:94:81)
at NodePath.simpleMap.path (/usr/local/lib/node_modules/dva-cli/node_modules/dva-ast/lib/collections/Router.js:117:13)
at NodePath. (/usr/local/lib/node_modules/dva-cli/node_modules/dva-ast/lib/collections/Helper.js:21:28)
at __paths.forEach (/usr/local/lib/node_modules/dva-cli/node_modules/jscodeshift/src/Collection.js:76:36)
at Array.forEach (native)
at Collection.forEach (/usr/local/lib/node_modules/dva-cli/node_modules/jscodeshift/src/Collection.js:75:18)
at Collection.simpleMap (/usr/local/lib/node_modules/dva-cli/node_modules/dva-ast/lib/collections/Helper.js:20:10)
Versions of packages used: (哪个库的哪个版本出现的问题)
2.0.1
The text was updated successfully, but these errors were encountered: