npm install axios

来源:3-12 自定义 hook 第三部分 - 正确的方式完成 URLLoader

qq_慕前端6125673

2020-04-28

图片描述
图片描述
运行 npm install axios 就报错,运行不起来了。

写回答

1回答

张轩

2020-04-28

同学你好 

看起来你的 react 的定义文件不知道怎么就丢失了 重新安装一下就好

npm isntall @types/react


0
1
qq_慕前端6125673
/Users/dujia/work/MyGit/learn_react/tx-react/src/index.tsx TypeScript error in /Users/dujia/work/MyGit/learn_react/tx-react/src/index.tsx(2,22): Could not find a declaration file for module 'react-dom'. '/Users/dujia/work/MyGit/learn_react/tx-react/node_modules/react-dom/index.js' implicitly has an 'any' type. If the 'react-dom' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom` TS7016 1 | import React from 'react'; > 2 | import ReactDOM from 'react-dom'; | ^ 3 | import './index.css'; 4 | import App from './App'; 5 | import * as serviceWorker from './serviceWorker';
2020-04-28
共1条回复

React18+TS高仿AntD从零到一打造组件库

设计,开发,测试,发布再到 CI/CD,从0到1造轮子

2122 学习 · 959 问题

查看课程