Trying to setup firebase for my Vue 3 walkie-talkie project - firebase
It seems some features of the Vuefire SDK have been deprecated, so it keeps throwing errors. This is my Repo & these are some of the error messages.
Browser console error
WARNING Compiled with 3 warnings 2:29:56 PM
warning in ./src/App.vue?vue&type=script&lang=js
export 'auth' (imported as 'auth') was not found in './firebase' (possible exports: default, storage)
warning in ./src/firebase.js
export 'default' (imported as 'firebase') was not found in 'firebase/app' (possible exports: FirebaseError, SDK_VERSION, _DEFAULT_ENTRY_NAME, _addComponent, _addOrOverwriteComponent, _apps, _clearComponents, _components, _getProvider, _registerComponent, _removeServiceInstance, deleteApp, getApp, getApps, initializeApp, onLog, registerVersion, setLogLevel)
warning in ./src/main.js
export 'default' (imported as 'Vue') was not found in 'vue' (possible exports: BaseTransition, Comment, EffectScope, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, Transition, TransitionGroup, VueElement, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, compile, computed, createApp, createBlock, createCommentVNode, createElementBlock, createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineProps, defineSSRCustomElement, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hydrate, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId)
App running at:
Local: http://localhost:8080/
Network: http://192.168.0.154:8080/
Cli error
app.js:160 Uncaught TypeError: Cannot read properties of undefined (reading 'storage')
at eval (firebase.js?67d8:28:1)
at ./src/firebase.js (app.js:41:1)
at __webpack_require__ (app.js:157:33)
at fn (app.js:390:21)
at eval (index.js??clonedRule…script&lang=js:2:67)
at ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/App.vue?vue&type=script&lang=js (app.js:19:1)
at __webpack_require__ (app.js:157:33)
at fn (app.js:390:21)
at eval (App.vue?vue&type=script&lang=js:5:206)
at ./src/App.vue?vue&type=script&lang=js (app.js:85:1)
eval # firebase.js?67d8:28
./src/firebase.js # app.js:41
__webpack_require__ # app.js:157
fn # app.js:390
eval # index.js??clonedRule…pe=script&lang=js:2
./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/App.vue?vue&type=script&lang=js # app.js:19
__webpack_require__ # app.js:157
fn # app.js:390
eval # App.vue?vue&type=script&lang=js:5
./src/App.vue?vue&type=script&lang=js # app.js:85
__webpack_require__ # app.js:157
fn # app.js:390
eval # App.vue:3
./src/App.vue # app.js:74
__webpack_require__ # app.js:157
fn # app.js:390
eval # main.js:3
./src/main.js # app.js:52
__webpack_require__ # app.js:157
(anonymous) # app.js:1278
__webpack_require__.O # app.js:203
(anonymous) # app.js:1279
(anonymous)
I've searched online & it seems to be a version problem (my guess). However when I try to install firebase versions 8 and below it throws up some brand new errors. I've set up my firebase config with all my details on the firebase.js file in my repo.
I'm just trying to connect my firebase with my application and test to ensure it works. I'd really appreciate any help.
Related
React Table TypeError: Cannot read properties of undefined (reading 'isGrouped')
I am using react-table#7.7.0 and #types/react-table#7.7.9 Together with react-table-config.d.ts from this answer. In my project, I have a table that uses the useExpanded plugin and works perfectly. But when I add useRowSelect and toggleRowSelected is called it crashes. I tried to create a simple example of that error with js but I couldn't. Things I tried: Setting selectedRowIds manually using the initialState of the table works. Adding the useGroupBy plugin doesn't help. I thought it might help since the error is related to isGrouped. Using toggleRowSelected(rowId) instead of row.toggleRowSelected() doesn't help. The error message: Uncaught TypeError: Cannot read properties of undefined (reading 'isGrouped') at handleRowById (useRowSelect.js:157:1) at useRowSelect.js:166:1 at Array.forEach (<anonymous>) at handleRowById (useRowSelect.js:166:1) at reducer$8 (useRowSelect.js:170:1) at useTable.js:124:1 at Array.reduce (<anonymous>) at useTable.js:117:1 at updateReducer (react-dom.development.js:15318:1) at Object.useReducer (react-dom.development.js:16425:1) at Object.useReducer (react.development.js:1512:1) at useTable (useTable.js:57:1) at LeftTable (index.tsx:137:1) at renderWithHooks (react-dom.development.js:14985:1) at updateFunctionComponent (react-dom.development.js:17356:1) at beginWork (react-dom.development.js:19063:1) at HTMLUnknownElement.callCallback (react-dom.development.js:3945:1) at Object.invokeGuardedCallbackDev (react-dom.development.js:3994:1) at invokeGuardedCallback (react-dom.development.js:4056:1) at beginWork$1 (react-dom.development.js:23964:1) at performUnitOfWork (react-dom.development.js:22776:1) at workLoopSync (react-dom.development.js:22707:1) at renderRootSync (react-dom.development.js:22670:1) at performSyncWorkOnRoot (react-dom.development.js:22293:1) at react-dom.development.js:11327:1 at unstable_runWithPriority (scheduler.development.js:468:1) at runWithPriority$1 (react-dom.development.js:11276:1) at flushSyncCallbackQueueImpl (react-dom.development.js:11322:1) at flushSyncCallbackQueue (react-dom.development.js:11309:1) at discreteUpdates$1 (react-dom.development.js:22420:1) at discreteUpdates (react-dom.development.js:3756:1) at dispatchDiscreteEvent (react-dom.development.js:5889:1) Here is the codesandbox (doesn't recreate the problem)
Debugging terminal output: CssSyntaxError
I am experiencing 2 errors in my current build, these appear to be CssSyntaxErrors. Could this be due to deprecated modules? Also, the terminal output seems to be pointing to src/index.tsx Unknown word I'm unsure where the error lies here. I understand that "use strict"; is used in the modules in question but is this causing a problem in my .tsx file within my src folder? Any help is greatly appreciated, thank you. Here is my terminal output: blakelucey#Blakes-Air fsd-next % yarn run build yarn run v1.22.15 warning ../../package.json: No license field $ webpack --progress BUILD_DIR /Users/blakelucey/Desktop/fsd-next/build SRC_DIR /Users/blakelucey/Desktop/fsd-next/src assets by status 19.2 KiB [cached] 2 assets runtime modules 41 KiB 15 modules orphan modules 39 bytes [orphan] 1 module ./src/index.tsx 39 bytes [built] [code generated] WARNING in configuration The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment. You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/configuration/mode/ ERROR in ./src/index.tsx (./src/index.tsx.webpack[javascript/auto]!=!./node_modules/css-loader/dist/cjs.js!./node_modules/ts-loader/index.js!./src/index.tsx) Module build failed (from ./node_modules/css-loader/dist/cjs.js): CssSyntaxError (1:1) /Users/blakelucey/Desktop/fsd-next/src/index.tsx Unknown word > 1 | "use strict"; | ^ 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | var React = require("react"); # ./src/index.tsx ERROR in ./src/index.tsx Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js): HookWebpackError: Module build failed (from ./node_modules/css-loader/dist/cjs.js): CssSyntaxError (1:1) /Users/blakelucey/Desktop/fsd-next/src/index.tsx Unknown word > 1 | "use strict"; | ^ 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | var React = require("react"); at tryRunOrWebpackError (/Users/blakelucey/Desktop/fsd-next/node_modules/webpack/lib/HookWebpackError.js:88:9) at __webpack_require_module__ (/Users/blakelucey/Desktop/fsd-next/node_modules/webpack/lib/Compilation.js:4966:12) at __webpack_require__ (/Users/blakelucey/Desktop/fsd-next/node_modules/webpack/lib/Compilation.js:4923:18) at /Users/blakelucey/Desktop/fsd-next/node_modules/webpack/lib/Compilation.js:4994:20 at symbolIterator (/Users/blakelucey/Desktop/fsd-next/node_modules/neo-async/async.js:3485:9) at done (/Users/blakelucey/Desktop/fsd-next/node_modules/neo-async/async.js:3527:9) at Hook.eval [as callAsync] (eval at create (/Users/blakelucey/Desktop/fsd-next/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1) at /Users/blakelucey/Desktop/fsd-next/node_modules/webpack/lib/Compilation.js:4901:43 at symbolIterator (/Users/blakelucey/Desktop/fsd-next/node_modules/neo-async/async.js:3482:9) at timesSync (/Users/blakelucey/Desktop/fsd-next/node_modules/neo-async/async.js:2297:7) at Object.eachLimit (/Users/blakelucey/Desktop/fsd-next/node_modules/neo-async/async.js:3463:5) at /Users/blakelucey/Desktop/fsd-next/node_modules/webpack/lib/Compilation.js:4866:16 at symbolIterator (/Users/blakelucey/Desktop/fsd-next/node_modules/neo-async/async.js:3485:9) at timesSync (/Users/blakelucey/Desktop/fsd-next/node_modules/neo-async/async.js:2297:7) at Object.eachLimit (/Users/blakelucey/Desktop/fsd-next/node_modules/neo-async/async.js:3463:5) at /Users/blakelucey/Desktop/fsd-next/node_modules/webpack/lib/Compilation.js:4834:15 -- inner error -- Error: Module build failed (from ./node_modules/css-loader/dist/cjs.js): CssSyntaxError (1:1) /Users/blakelucey/Desktop/fsd-next/src/index.tsx Unknown word > 1 | "use strict"; | ^ 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | var React = require("react"); at Object.<anonymous> (/Users/blakelucey/Desktop/fsd-next/node_modules/css-loader/dist/cjs.js!/Users/blakelucey/Desktop/fsd-next/node_modules/ts-loader/index.js!/Users/blakelucey/Desktop/fsd-next/src/index.tsx:1:7) at /Users/blakelucey/Desktop/fsd-next/node_modules/webpack/lib/javascript/JavascriptModulesPlugin.js:432:11 at Hook.eval [as call] (eval at create (/Users/blakelucey/Desktop/fsd-next/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:7:1) at /Users/blakelucey/Desktop/fsd-next/node_modules/webpack/lib/Compilation.js:4968:39 at tryRunOrWebpackError (/Users/blakelucey/Desktop/fsd-next/node_modules/webpack/lib/HookWebpackError.js:83:7) at __webpack_require_module__ (/Users/blakelucey/Desktop/fsd-next/node_modules/webpack/lib/Compilation.js:4966:12) at __webpack_require__ (/Users/blakelucey/Desktop/fsd-next/node_modules/webpack/lib/Compilation.js:4923:18) at /Users/blakelucey/Desktop/fsd-next/node_modules/webpack/lib/Compilation.js:4994:20 at symbolIterator (/Users/blakelucey/Desktop/fsd-next/node_modules/neo-async/async.js:3485:9) at done (/Users/blakelucey/Desktop/fsd-next/node_modules/neo-async/async.js:3527:9) at Hook.eval [as callAsync] (eval at create (/Users/blakelucey/Desktop/fsd-next/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1) at /Users/blakelucey/Desktop/fsd-next/node_modules/webpack/lib/Compilation.js:4901:43 at symbolIterator (/Users/blakelucey/Desktop/fsd-next/node_modules/neo-async/async.js:3482:9) at timesSync (/Users/blakelucey/Desktop/fsd-next/node_modules/neo-async/async.js:2297:7) at Object.eachLimit (/Users/blakelucey/Desktop/fsd-next/node_modules/neo-async/async.js:3463:5) at /Users/blakelucey/Desktop/fsd-next/node_modules/webpack/lib/Compilation.js:4866:16 Generated code for /Users/blakelucey/Desktop/fsd-next/node_modules/css-loader/dist/cjs.js!/Users/blakelucey/Desktop/fsd-next/node_modules/ts-loader/index.js!/Users/blakelucey/Desktop/fsd-next/src/index.tsx 1 | throw new Error("Module build failed (from ./node_modules/css-loader/dist/cjs.js):\nCssSyntaxError\n\n(1:1) /Users/blakelucey/Desktop/fsd-next/src/index.tsx Unknown word\n\n\u001b[1m\u001b[31m>\u001b[39m\u001b[22m\u001b[90m 1 | \u001b[39m\u001b[32m\"use strict\"\u001b[39m\u001b[33m;\u001b[39m\n \u001b[90m | \u001b[39m\u001b[1m\u001b[31m^\u001b[39m\u001b[22m\n \u001b[90m 2 | \u001b[39m\u001b[36mObject.defineProperty\u001b[39m\u001b[36m(\u001b[39mexports, \u001b[32m\"__esModule\"\u001b[39m, \u001b[33m{\u001b[39m value\u001b[33m:\u001b[39m true \u001b[33m}\u001b[39m\u001b[36m)\u001b[39m\u001b[33m;\u001b[39m\n \u001b[90m 3 | \u001b[39mvar React = \u001b[36mrequire\u001b[39m\u001b[36m(\u001b[39m\u001b[32m\"react\"\u001b[39m\u001b[36m)\u001b[39m\u001b[33m;\u001b[39m\n"); webpack 5.58.2 compiled with 2 errors and 1 warning in 8550 ms error Command failed with exit code 1.
AWS Amplify `No plugin found in Storage for the provider` error
My AWS amplify application uses storage. When I am running the application I am getting a No plugin found in Storage for the provider error. Some of things that I have tried are: a. removing and adding storage module by `amplify add\remove storage` commands. b. Manually configuring storage in main.js based on this [github issue][1]. c. deleting the application's node_modules and adding them again. What could I be missing? main.js: import Amplify,{Auth, Storage} from 'aws-amplify'; import '#aws-amplify/ui-vue'; import aws_exports from './aws-exports'; Amplify.configure(aws_exports); main.js: Added code to manually configure storage as per this github issue: Amplify.configure({ Auth: { identityPoolId: '<IdentityPoolId>', region: "<region>", userPoolId: "<userPoolId>", userPoolWebClientId: "<userPoolWebClientId>", }, Storage: { AWSS3: { bucket: "<bucket>", region: "<region>", } } }); StackTrace: Uncaught (in promise) No plugin found in Storage for the provider (anonymous) # 4.js:241 step # 4.js:69 (anonymous) # 4.js:50 (anonymous) # 4.js:44 push../node_modules/#aws-amplify/storage/lib-esm/Storage.js.__awaiter # 4.js:40 push../node_modules/#aws-amplify/storage/lib-esm/Storage.js.Storage.put # 4.js:234 _loop$ # 18.js:286 tryCatch # vendors~app.js:455791 invoke # vendors~app.js:456017 prototype.<computed> # vendors~app.js:455843 tryCatch # vendors~app.js:455791 maybeInvokeDelegate # vendors~app.js:456080 invoke # vendors~app.js:455991 prototype.<computed> # vendors~app.js:455843 asyncGeneratorStep # vendors~app.js:162870 _next # vendors~app.js:162892 (anonymous) # vendors~app.js:162899 F # vendors~app.js:319219 (anonymous) # vendors~app.js:162888 TranscribeFiles # 18.js:392 invokeWithErrorHandling # vendors~app.js:433345 invoker # vendors~app.js:433670 invokeWithErrorHandling # vendors~app.js:433345 Vue.$emit # vendors~app.js:435374 clickButton # vendors~app.js:444622 click # vendors~app.js:444498 invokeWithErrorHandling # vendors~app.js:433345 invoker # vendors~app.js:433670 original._wrapper # vendors~app.js:438399
I was able to get the application working by a. removing the manual configuration in main.js, b. removing storage completely, c. publishing the application to aws, d. adding storage back again and publishing the application to aws.
Firebase Auth UI with Vuejs
I've followed this tutorial to create a vue component for login users with firebase Auth UI. but I keep getting an error in console. I've used firebase pre-built UI using its cdn in non-vue project before and it worked. but I can't figure out the way of implementing it with vueJS. any help? source code userLogin.vue component : <template> <div id="userLogin"> <h1 class="text-center">Login</h1> <div id="firebaseui-auth-container" style="margin-top:200px;"></div> </div> </template> <script> import firebaseui from 'firebaseui'; import firebase from '../firebaseInit' export default { name: 'userLogin', data() { return { } }, mounted() { var uiConfig = { signInSuccessUrl: '/success', signInOptions: [ firebase.auth.GoogleAuthProvider.PROVIDER_ID, firebase.auth.EmailAuthProvider.PROVIDER_ID ] }; var ui = new firebaseui.auth.AuthUI(firebase.auth()); ui.start('#firebaseui-auth-container', uiConfig); } } </script> here is the error : `[Vue warn]: Error in mounted hook: "TypeError: Cannot read property 'PROVIDER_ID' of undefined" found in ---> <UserLogin> at src\components\userLogin.vue <App> at src\App.vue <Root> warn # vue.esm.js?efeb:576 logError # vue.esm.js?efeb:1729 globalHandleError # vue.esm.js?efeb:1724 handleError # vue.esm.js?efeb:1713 callHook # vue.esm.js?efeb:2912 insert # vue.esm.js?efeb:4086 invokeInsertHook # vue.esm.js?efeb:5853 patch # vue.esm.js?efeb:6072 Vue._update # vue.esm.js?efeb:2652 updateComponent # vue.esm.js?efeb:2780 get # vue.esm.js?efeb:3130 Watcher # vue.esm.js?efeb:3119 mountComponent # vue.esm.js?efeb:2787 Vue$3.$mount # vue.esm.js?efeb:8407 Vue$3.$mount # vue.esm.js?efeb:10747 Vue._init # vue.esm.js?efeb:4559 Vue$3 # vue.esm.js?efeb:4648 (anonymous) # main.js?3479:17 ./src/main.js # app.js:6169 __webpack_require__ # app.js:679 fn # app.js:89 0 # app.js:6194 __webpack_require__ # app.js:679 (anonymous) # app.js:725 (anonymous) # app.js:728 vue.esm.js?efeb:1733 TypeError: Cannot read property 'PROVIDER_ID' of undefined at VueComponent.mounted (userLogin.vue?e569:23) at callHook (vue.esm.js?efeb:2910) at Object.insert (vue.esm.js?efeb:4086) at invokeInsertHook (vue.esm.js?efeb:5853) at Vue$3.patch [as __patch__] (vue.esm.js?efeb:6072) at Vue$3.Vue._update (vue.esm.js?efeb:2652) at Vue$3.updateComponent (vue.esm.js?efeb:2780) at Watcher.get (vue.esm.js?efeb:3130) at new Watcher (vue.esm.js?efeb:3119) at mountComponent (vue.esm.js?efeb:2787) node version : v8.9.4
Uncaught Error: Module build failed: Error: No PostCSS Config found in: \ng2-admin\node_modules\bootstrap-loader at Error (native)
I have clone ng2-admin directory from git hub few days back and run npm install after that i am able to run and see the UI, now I had been deleted node_modules folder, docs folder, and dist folder from ng2-admin now facing below error in browser console with scattered UI. So how to fix below error, ` Uncaught Error: Module build failed: Error: No PostCSS Config found in: D:\ng2-admin\node_modules\bootstrap-loader at Error (native) at D:\ng2-admin\node_modules\postcss-load-config\index.js:51:26 at Error (native) at D:\ng2-admin\node_modules\postcss-load-config\index.js:51:26 at Object../node_modules/css-loader/index.js!./node_modules/postcss-loader/index.js!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/index.js?sourceMap!./node_modules/bootstrap-loader/lib/bootstrap.styles.loader.js!./node_modules/bootstrap-loader/no-op.js (http://localhost:5000/assets/vendor.bundle.js:56497:7) at __webpack_require__ (http://localhost:5000/assets/polyfills.bundle.js:54:30) at Object../node_modules/style-loader/index.js!./node_modules/css-loader/index.js!./node_modules/postcss-loader/index.js!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/index.js?sourceMap!./node_modules/bootstrap-loader/lib/bootstrap.styles.loader.js!./node_modules/bootstrap-loader/no-op.js (http://localhost:5000/assets/vendor.bundle.js:88168:15) at __webpack_require__ (http://localhost:5000/assets/polyfills.bundle.js:54:30) at Object../node_modules/bootstrap-loader/lib/bootstrap.loader.js!./node_modules/bootstrap-loader/no-op.js (http://localhost:5000/assets/vendor.bundle.js:52755:22) at __webpack_require__ (http://localhost:5000/assets/polyfills.bundle.js:54:30) at Object../node_modules/bootstrap-loader/loader.js (http://localhost:5000/assets/vendor.bundle.js:52782:18) at __webpack_require__ (http://localhost:5000/assets/polyfills.bundle.js:54:30) at Object../src/vendor.browser.ts (http://localhost:5000/assets/vendor.bundle.js:90058:1) at __webpack_require__ (http://localhost:5000/assets/polyfills.bundle.js:54:30) at Object.5 (http://localhost:5000/assets/vendor.bundle.js:90087:18) at __webpack_require__ (http://localhost:5000/assets/polyfills.bundle.js:54:30) at webpackJsonpCallback (http://localhost:5000/assets/polyfills.bundle.js:25:23) at http://localhost:5000/assets/vendor.bundle.js:2:1 ./node_modules/css-loader/index.js!./node_modules/postcss-loader/index.js!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/index.js?sourceMap!./node_modules/bootstrap-loader/lib/bootstrap.styles.loader.js!./node_modules/bootstrap-loader/no-op.js # util.js:164 __webpack_require__ # bootstrap 7cfd64b…:52 ./node_modules/style-loader/index.js!./node_modules/css-loader/index.js!./node_modules/postcss-loader/index.js!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/index.js?sourceMap!./node_modules/bootstrap-loader/lib/bootstrap.styles.loader.js!./node_modules/bootstrap-loader/no-op.js # no-op.js?6a4c:4 __webpack_require__ # bootstrap 7cfd64b…:52 ./node_modules/bootstrap-loader/lib/bootstrap.loader.js!./node_modules/bootstrap-loader/no-op.js # no-op.js:1 __webpack_require__ # bootstrap 7cfd64b…:52 ./node_modules/bootstrap-loader/loader.js # loader.js:1 __webpack_require__ # bootstrap 7cfd64b…:52 ./src/vendor.browser.ts # vendor.browser.ts:24 __webpack_require__ # bootstrap 7cfd64b…:52 5 # src async:7 __webpack_require__ # bootstrap 7cfd64b…:52 webpackJsonpCallback # bootstrap 7cfd64b…:23 (anonymous) # vendor.bundle.js:2 lang.js:134 Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode. client:38 [WDS] Errors while compiling. client:80 ./~/css-loader!./~/postcss-loader!./~/resolve-url-loader!./~/sass-loader?sourceMap!./~/bootstrap-loader/lib/bootstrap.styles.loader.js!./~/bootstrap-loader/no-op.js Module build failed: Error: No PostCSS Config found in: D:\ng2-admin\node_modules\bootstrap-loader at Error (native) at D:\Client2\ng2-admin\node_modules\postcss-load-config\index.js:51:26 # ./~/style-loader!./~/css-loader!./~/postcss-loader!./~/resolve-url-loader!./~/sass-loader?sourceMap!./~/bootstrap-loader/lib/bootstrap.styles.loader.js!./~/bootstrap-loader/no-op.js 4:14-193 # ./~/bootstrap-loader/lib/bootstrap.loader.js!./~/bootstrap-loader` /no-op.js` # ./~/bootstrap-loader/loader.js # ./src/vendor.browser.ts # multi vendor `
The solution is very simple. You need to add a file on your project root directory: postcss.config.js Inside, the content can be: module.exports = {}; This is a translated version of a now-deleted non-English answer by Feng SHADU.
If you don't want to add another file, it's enough to add your options in your webpack config: { loader: `postcss-loader`, options: { options: {}, plugins: () => { autoprefixer({ browsers: [ 'last 2 versions' ] }); } } },
The solution is actually to properly reference the config file in the loader options like this (create an empty one if you don't have it yet, though): { loader: 'postcss-loader', options: { config: { path: 'path/to/postcss.config.js' } } } You are not supposed to create empty or dummy placeholder configs in the node_modules folders.
This can be caused by a reference error, more specifically an import for CSS file that doesn't exist.
Create node_modules/bootstrap-loader/postcss.config.js with the contents module.exports={};