Vue 3 - Bootstrap Rollup Failure - vuejs3

I'm new Vue, I don't understand this error from installing bootstrap-vue-3
Install commands:
npm i --save bootstrap bootstrap-vue-3
Configuration [main.js]:
import { createApp } from 'vue'
import App from './App.vue'
import './index.css'
import BootstrapVue3 from 'bootstrap-vue-3'
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue-3/dist/bootstrap-vue-3.css'
createApp(App)
.use(BootstrapVue3)
.mount('#app')
Errors:
Rollup failed to resolve import "bootstrap/js/dist/carousel" from "node_modules/bootstrap-vue-3/dist/bootstrap-vue-3.es.js".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to rollupInputOptions.external
This is a new project -- nothing added aside from default stuff and bootstrap.

Related

Css working fine for development but not being applied after production buid - React

I created an app using create-react-app, while running the code for development using npm start the pages are loading fine with all the css but when I build the project using npm run build the css won't load. Below are the attached screenshots and code snippets.
Page being loaded in development.
Same page when the build folder is served.
Here is the App.js imports
import React, { useEffect, useState } from "react";
import "bootstrap/dist/css/bootstrap.min.css";
import "jquery/dist/jquery.min.js";
import "bootstrap/dist/js/bootstrap.min.js";
import "./assets/css/classy-nav.min.css";
import "./assets/vendors/font-awesome/v5.9.0/all.css";
import "./assets/vendors/animate-css/animate.css";
import "./assets/vendors/magnify-popup/magnific-popup.css";
import "./assets/css/style.css";
import "owl.carousel/dist/assets/owl.carousel.css";
import "owl.carousel/dist/assets/owl.theme.default.css";
import { toast, ToastContainer } from "react-toastify";
import "react-toastify/dist/ReactToastify.css";
import $ from "jquery";
import { WOW } from "wowjs";
toast.configure();
You might just need to run npm start after npm install.

/src/firebase.js Module not found: Can't resolve 'firebase' in '/Users/anujgoyal/Desktop/reels/src'\?

image of the project and files
I am trying to import firebase in my react app, using the following syntax:
import firebase from "firebase";
But I am facing following issue:
./src/firebase.js
Module not found: Can't resolve 'firebase' in '/Users/Desktop/reels/src'
commands i have ran on terminal:
npm i firebase
Also i have checked in the node modules firebase was there.
You should try this code
import { initializeApp } from "firebase/app";
import { getFirestore } from "firebase/firestore";
I think you're using the ^9 version, so try this:
import firebase from 'firebase/compat/app'

The browser tells "failed to compile"

i import the bootstrap vue like this:
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'
i already tried consulting all forums with similar questions but nothing
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'
Failed to compile.
/home/fabry/node_modules/bootstrap-vue/dist/bootstrap-vue.css (./node_modules/css-loader??ref--6-oneOf-3-1!./node_modules/postcss-loader/src??ref--6-oneOf-3-2!/home/fabry/node_modules/bootstrap-vue/dist/bootstrap-vue.css)
Module build failed (from ./node_modules/postcss-loader/src/index.js):
Error: No PostCSS Config found in: /home/fabry/node_modules/bootstrap-vue/dist
at config.search.then (/home/fabry/Scrivania/programmazione/web/Vue/realVueFool/quiz/node_modules/postcss-load-config/src/index.js:91:15)
Did you follow the instructions here?
It sounds like you either didn't install all the dependencies or failed to register components in your Vue app.

react-native error after import firebase

I have installed firebase package in my project using cmd
npm install --save firebase
When I import firebase to my react-native project import firebase from 'firebase' I'm getting this error. What could be the problem?
Follow this pattern the error will be resolved the issue is due to upgradation in Firebase repo:
import React, {Component} from 'react';
import {Text, View} from 'react-native';
// import firebase from 'firebase';
import firebase from '#firebase/app'
import { Header } from './Components/Common';
Ran into Same issue i solved it by installing babel polyfill
npm i --save-dev babel-polyfill
then in my index.js:
import 'babel-polyfill';
thats because of the recent version of firebase you can roll back to version 4 or you can import like
import firebase from '#firebase/app';
any of the above two approaches will solve your problem

Using React components from npm in Meteor 1.3

I would like to know how to use React components from npm in Meteor 1.3 using import.
I am trying to use react-gravatar in my project. I did npm install --save react-gravatar. And in my component, I required it:
import React from 'react';
import Gravatar from 'react-gravatar';
export default React.createClass({
render() {
...
}
});
But I get:
Uncaught Error: Cannot find module 'querystring'
I think this is because querystring is not available in client side, and I need to use browserify-reactify of some sort. But how can I do so in Meteor 1.3?

Resources