我想在ReactJS应用程序中使用MaterialUI创建一个表。因此,我已经使用以下行导入了模块,正如MaterialUI官方网站建议的那样:
import {
Table,
TableBody,
TableHeader,
TableHeaderColumn,
TableRow,
TableRowColumn,
} from 'material-ui/Table';
问题在于,当我启动npm start
时,它说:
Can't resolve 'material-ui/Table in 'C:\Users\myprojectpath\src'
实际上在我的" node_modules"文件夹我有一个名为" material-ui-table"的文件夹,而且还有Material UI按钮,因此应该正确安装Material UI ...
答案 0 :(得分:0)
使用此命令安装material-ui:
close()
答案 1 :(得分:0)
你能用这个
吗?import hudson.model.*;
import hudson.AbortException;
import java.util.concurrent.CancellationException;
def allNodes = jenkins.model.Jenkins.instance.nodes
def triggerJob = false
for (node in allNodes) {
if ( node.getComputer().isOnline() && node.nodeName == "special_node" ) {
println node.nodeName + " " + node.getComputer().countBusy() + " " + node.getComputer().getOneOffExecutors().size
triggerJob = true
break
}
}
if (triggerJob) {
println("triggering child build as node available")
def job = Hudson.instance.getJob('JobB')
def anotherBuild
try {
def params = [
new StringParameterValue('ParamOne', '123'),
]
def future = job.scheduleBuild2(0, new Cause.UpstreamCause(build), new ParametersAction(params))
anotherBuild = future.get()
} catch (CancellationException x) {
throw new AbortException("${job.fullDisplayName} aborted.")
}
} else {
println("failing parent build as node not available")
build.getExecutor().interrupt(hudson.model.Result.FAILURE)
throw new InterruptedException()
}
在这里,你不需要像你在范围内定义的材料-ui / Table那样需要它
示例:
import {
Table,
TableHead,
TableBody,
TableCell,
TableFooter,
TablePagination,
TableRow,
Paper } from 'material-ui';
以上代码工作正常。
答案 2 :(得分:0)
试试这将解决你的无法解决'material-ui / core / Button'错误。
import { Button } from 'material-ui'
或者
import Button from 'material-ui/Button';