Skip to content

Module not found: Can't resolve in src when installing module from local folder #4904

@wizzfizz94

Description

@wizzfizz94

Is this a bug report?

Yes

Did you try recovering your dependencies?

Yes I've tried re-creating the project with both npm and yarn after updated the package managers.
npm version: 6.2.0
yarn version: 1.9.4

Which terms did you search for in User Guide?

Search words: Module not found: Can't resolve local install src

Environment

Environment:
OS: Linux 4.8
Node: 10.9.0
Yarn: 1.9.4
npm: 6.2.0
Watchman: Not Found
Xcode: N/A
Android Studio: Not Found

Packages: (wanted => installed)
react: ^16.4.2 => 16.4.2
react-dom: ^16.4.2 => 16.4.2
react-scripts: 1.1.4 => 1.1.4

Steps to Reproduce

  1. cd src/
  2. git clone https://github.com/alexsyo/react-circular-slider-bar
  3. cd ..
  4. yarn add file:src/react-circular-slider-bar
  5. added the circular component as instructed by https://github.com/alexsyo/react-circular-slider-bar to App.js
  6. yarn start

Expected Behavior

Module should be found in src file and loaded with webpack but it cannot be found. I noticed that the module itself has a dependacy on an old version of webpack but im not sure if this would effect behaviour. It should also be noted that this error has been fluctuating ie. sometimes occurs and sometimes doesnt. Does this have something to do with the linking of local files with webpack?

this is the folder structure:
├── package.json
├── public
│   ├── favicon.ico
│   ├── index.html
│   └── manifest.json
├── README.md
├── src
│   ├── App.css
│   ├── App.js
│   ├── App.test.js
│   ├── index.css
│   ├── index.js
│   ├── logo.svg
│   ├── react-circular-slider-bar

Actual Behavior

compiler errors:
selection_079
selection_078

Reproducible Demo

No demo at this stage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions