Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Could not be found within the project

$
0
0

Im struggling here.

I could not install a NPM registry properly from Github so I decided to install the files manually.

I created a folder called /libs and I copied across the files and changed all the import statments

ie from:

import {ParticipationType} from '@registryName/lib';

to:

import {ParticipationType} from 'views/libs/types';

I then deleted the package from package.json, ran yarn install and then proceeded to run my project with npx react-native run-android and I get the following error:

error: bundling failed: Error: Unable to resolve module `views/libs/types` from `views/pages/Dashboard/DashboardView.tsx`: views/libs/types could not be found within the project.

Im really confused as the ParticipationType file is present in the views/libs/types folder but its not picking up on it in the console.

Things i've tried so far:

Clear watchman watches: watchman watch-del-all

and

Delete node_modules: rm -rf node_modules and run yarn install

and

Reset Metro's cache: yarn start --reset-cache

All help welcome


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>