Answers for "unable to resolve module"

1

Error: Cannot find module 'resolve'

$ rm -rf node_modules package-lock.json
$ npm i
Posted by: Guest on March-17-2021
1

Error: Unable to resolve module ./index from

Encounterd this error Error: Unable to resolve module  in react native after renaming .js file to .jsx. Fixed it by adding
  resolver: {
    sourceExts: ['jsx', 'js'],
  },
  
  to metro config
Posted by: Guest on May-22-2021
0

unable to resolve module @firebase/app

import firebase from 'firebase/app';
import 'firebase/auth';
import 'firebase/firestore';
import 'firebase/storage';
import 'firebase/messaging';
import 'firebase/analytics';
import {
API_KEY,
AUTH_DOMAIN,
DATABASE_URL,
PROJECT_ID,
STORAGE_BUCKET,
MESSAGING_SENDER_ID,
APP_ID,
MEASUREMENT_ID,
MESSAGING_VAPID_KEY,
} from '../config';

const config = {
 apiKey: API_KEY,
 authDomain: AUTH_DOMAIN,
 databaseURL: DATABASE_URL,
 projectId: PROJECT_ID,
 storageBucket: STORAGE_BUCKET,
 messagingSenderId: MESSAGING_SENDER_ID,
 appId: APP_ID,
 measurementId: MEASUREMENT_ID,
};

// Initialize Firebase App with Configurations
firebase.initializeApp(config);

// Setup Firestore
const analytics = firebase.analytics();
const database = firebase.firestore();
const storage = firebase.storage();

// Setup push messaging
let messaging = null;
if (firebase.messaging.isSupported()) {
  messaging = firebase.messaging();
  messaging.usePublicVapidKey(MESSAGING_VAPID_KEY);
}

export {
  firebase, storage, messaging, analytics, config, database as default,
};
Posted by: Guest on September-11-2021

Code answers related to "unable to resolve module"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language