当我运行npm install时,我收到此错误:
npm ERR! code EBADPLATFORM npm ERR! notsup Unsupported platform for
fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current:
{"os":"win32","arch":"x64"}) npm ERR! notsup Valid OS: darwin npm
ERR! notsup Valid Arch: any npm ERR! notsup Actual OS: win32 npm
ERR! notsup Actual Arch: x64
Run Code Online (Sandbox Code Playgroud)
这里已经被问到了,但是接受的答案是它是可选的并不适合我,因为我无法发布到azure,因为npm安装失败.
npm版本: 5.6.0
我试过了:
npm install --no-optional
Run Code Online (Sandbox Code Playgroud) 当我尝试在 SSMS v17.3 中查询数据时,收到以下错误消息:
预期有 1 个合约名称为“Microsoft.VisualStudio.Utilities.IContentTypeRegistryService”的导出,但在应用适用的约束后发现 0 个导出。(mscorlib)
我的计算机上有 Visual Studio 2015 和 2017 Community Edition。
我尝试过的:
ComponentCache
删除了其中的所有文件夹AppData/Local/Microsoft/VisualStudio
修复SSMS并重新启动
我是反应新手,并尝试使用react-dnd 实现拖放。但是我不能在基于类的组件中使用钩子。由于以下部分的代码,我收到错误。
const [{ isDragging }, drag] = useDrag({
item: { type: ItemTypes.Student },
collect: (monitor) => ({
isDragging: !!monitor.isDragging(),
}),
});
Run Code Online (Sandbox Code Playgroud)
如何在仍然使用基于类的组件的同时实现相同的功能?下面是完整的代码
class App extends Component {
state = {
values: [],
};
const [{ isDragging }, drag] = useDrag({
item: { type: ItemTypes.Student },
collect: (monitor) => ({
isDragging: !!monitor.isDragging(),
}),
});
divStyle = {
"margin-left": "20px",
};
componentDidMount() {
axios.get("http://localhost:5000/api/student").then((response) => {
this.setState({
values: response.data,
});
});
}
render() {
return (
<div
ref={drag}
style={{
opacity: isDragging …
Run Code Online (Sandbox Code Playgroud) 当我导航到我部署的 azure 网站时,出现错误,
You do not have permission to view this directory or page.
Run Code Online (Sandbox Code Playgroud)
在我的 web.config
<system.web>
<compilation debug="true" targetFramework="4.7"/>
<httpRuntime targetFramework="4.7"/>
</system.web>
<system.webServer>
<handlers>
<remove name="ExtensionlessUrlHandler-Integrated-4.0"/>
<remove name="OPTIONSVerbHandler"/>
<remove name="TRACEVerbHandler"/>
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler"
preCondition="integratedMode,runtimeVersionv4.0"/>
</handlers>
</system.webServer>
Run Code Online (Sandbox Code Playgroud)
完整的源代码在我的 github 中。我按照 微软文档将我的应用程序部署到 azure。当我在本地运行我的应用程序时,我没有错误。