【问题标题】:Not able to import jsx file from the directory, react无法从目录导入jsx文件,反应
【发布时间】:2020-09-04 06:39:51
【问题描述】:

现在条形图正在由 App.js 文件显示,但我想将整个代码转移到 Mismatch.jsx 文件并在 App.js 的返回中访问它

我无法将 mismatch.jsx 文件导入我的 app.js 文件 它给了我以下错误

ModuleNotFoundError
Could not find module in path: './src/components' relative to '/src/index.js'

https://codesandbox.io/s/react-chartjs-2-5bsbr?file=/src/index.js

【问题讨论】:

    标签: reactjs


    【解决方案1】:

    改成关注

    import  Mismatch  from "./container/mismatchdata/mismatch";
    

    同时安装引导程序

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-10-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-01-25
    • 2018-03-11
    • 2019-03-23
    • 2023-01-07
    相关资源
    最近更新 更多