webpack: Module not found: Error: Can't resolve (with relative path)

不羁的心 提交于 2019-12-04 02:41:23

Your file structure says that folder name is Container with a capital C. But you are trying t import it by container with a lowercase c. You will need to change one or the other because the paths are case sensitive.

while importing libraries use exact path to a file for example:

import Footer from './Footer/index.jsx'
import AddTodo from '../containers/AddTodo/index.jsx'
import VisibleTodoList from '../containers/VisibleTodoList/index.jsx'

Hope this may help

Had the same issue with module not found. Turns out I had a component import Picture from './Picture/Picture'; at the very bottom of all the imports. When I moved it below import React, { Component } from 'react';, it worked.

Just add it to your config. Source: https://www.jumoel.com/2017/zero-to-webpack.html

externals: [ nodeExternals() ]
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!