简体   繁体   中英

Failed to compile: module not found

I'm not sure what i'm doing wrong but i keep getting this message:

Module not found: Can't resolve 'components/List' in 'C:\Users\kobby\Documents\Lambda-School\buildwene\src\coek\hn-clone\src\components\App'

This is what the import looks like in App/index.js:

import React, { Component } from 'react';
import { ThemeProvider } from 'styled-components';
import List from 'components/List';
import { colorsDark } from 'styles/palette';

My folder dir is like so: C:\Users\kobby\Documents\Lambda-School\buildweek\hn-clone\src\components\App\index.js

This is the path for List: C:\Users\kobby\Documents\Lambda-School\buildweek\hn-clone\src\components\List

Path should be like this: import List from '../List/index';

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM