跟着视频教程学习react的时候,遇到一个问题,困扰了一阵,最后发现真的很傻!

问题如下:

'index.js' does not match the corresponding name on disk: '.\node_modules\

最后发现是import语句写的有问题,把react写成了React;

正确的引入语句是:

import React from 'react';

千万别把这个react大写奥!!!

相关文章:

  • 2022-01-10
  • 2021-10-18
  • 2021-04-16
  • 2021-10-27
  • 2022-02-23
  • 2021-11-22
猜你喜欢
  • 2021-08-19
  • 2021-11-22
  • 2022-12-23
  • 2022-12-23
  • 2021-09-10
  • 2021-03-31
相关资源
相似解决方案