Angular 11 firebase site not launching - angularfire

I've been working on an Angular11 firebase website, and I have managed to break something that has completely lost me. I did an npm audit that managed to break everything
I've tried removing and reinstalling everything I can, as well as starting a new project and readding
The Error:
TypeError: Cannot read property 'toString' of undefined
at new AngularFireModule (c:\nodejs\pt-web\node_modules\#angular\fire\__ivy_ngcc__\fesm2015\angular-fire.js:481:17)
at Object.factory (c:\nodejs\pt-web\node_modules\#angular\core\__ivy_ngcc__\fesm2015\core.js:11332:1)
at R3Injector.hydrate (c:\nodejs\pt-web\node_modules\#angular\core\__ivy_ngcc__\fesm2015\core.js:11385:1)
at R3Injector.get (c:\nodejs\pt-web\node_modules\#angular\core\__ivy_ngcc__\fesm2015\core.js:11205:1)
at c:\nodejs\pt-web\node_modules\#angular\core\__ivy_ngcc__\fesm2015\core.js:11242:1
at Set.forEach (<anonymous>)
at R3Injector._resolveInjectorDefTypes (c:\nodejs\pt-web\node_modules\#angular\core\__ivy_ngcc__\fesm2015\core.js:11242:1)
at new NgModuleRef$1 (c:\nodejs\pt-web\node_modules\#angular\core\__ivy_ngcc__\fesm2015\core.js:25228:1)
at NgModuleFactory$1.create (c:\nodejs\pt-web\node_modules\#angular\core\__ivy_ngcc__\fesm2015\core.js:25282:1)
at http://localhost:4200/vendor.js:114008:45 {stack: 'TypeError: Cannot read property 'toString' of… at http://localhost:4200/vendor.js:114008:45', message: 'Cannot read property 'toString' of undefined'}
arg0: TypeError: Cannot read property 'toString' of undefined
at new AngularFireModule (http://localhost:4200/vendor.js:138898:118)
at Object.factory (http://localhost:4200/vendor.js:96231:58)
at R3Injector.hydrate (http://localhost:4200/vendor.js:96284:35)
at R3Injector.get (http://localhost:4200/vendor.js:96104:33)
at http://localhost:4200/vendor.js:96141:55
at Set.forEach (<anonymous>)
at R3Injector._resolveInjectorDefTypes (http://localhost:4200/vendor.js:96141:31)
at new NgModuleRef$1 (http://localhost:4200/vendor.js:110127:26)
at NgModuleFactory$1.create (http://localhost:4200/vendor.js:110181:16)
at http://localhost:4200/vendor.js:114008:45 {stack: 'TypeError: Cannot read property 'toString' of… at http://localhost:4200/vendor.js:114008:45', message: 'Cannot read property 'toString' of undefined'}
message: 'Cannot read property 'toString' of undefined'
stack: 'TypeError: Cannot read property 'toString' of undefined\n at new AngularFireModule (http://localhost:4200/vendor.js:138898:118)\n at Object.factory (http://localhost:4200/vendor.js:96231:58)\n at R3Injector.hydrate (http://localhost:4200/vendor.js:96284:35)\n at R3Injector.get (http://localhost:4200/vendor.js:96104:33)\n at http://localhost:4200/vendor.js:96141:55\n at Set.forEach (<anonymous>)\n at R3Injector._resolveInjectorDefTypes (http://localhost:4200/vendor.js:96141:31)\n at new NgModuleRef$1 (http://localhost:4200/vendor.js:110127:26)\n at NgModuleFactory$1.create (http://localhost:4200/vendor.js:110181:16)\n at http://localhost:4200/vendor.js:114008:45'
__proto__: Error
<anonymous> # c:\nodejs\pt-web\src\main.ts:12:25
invoke # c:\nodejs\pt-web\node_modules\zone.js\dist\zone-evergreen.js:364
run # c:\nodejs\pt-web\node_modules\zone.js\dist\zone-evergreen.js:123
<anonymous> # c:\nodejs\pt-web\node_modules\zone.js\dist\zone-evergreen.js:857
invokeTask # c:\nodejs\pt-web\node_modules\zone.js\dist\zone-evergreen.js:399
runTask # c:\nodejs\pt-web\node_modules\zone.js\dist\zone-evergreen.js:167
drainMicroTaskQueue # c:\nodejs\pt-web\node_modules\zone.js\dist\zone-evergreen.js:569
◀ Promise.then ▶
scheduleMicroTask # c:\nodejs\pt-web\node_modules\zone.js\dist\zone-evergreen.js:552
scheduleTask # c:\nodejs\pt-web\node_modules\zone.js\dist\zone-evergreen.js:388
scheduleTask # c:\nodejs\pt-web\node_modules\zone.js\dist\zone-evergreen.js:210
scheduleMicroTask # c:\nodejs\pt-web\node_modules\zone.js\dist\zone-evergreen.js:230
scheduleResolveOrReject # c:\nodejs\pt-web\node_modules\zone.js\dist\zone-evergreen.js:847
then # c:\nodejs\pt-web\node_modules\zone.js\dist\zone-evergreen.js:979
bootstrapModule # c:\nodejs\pt-web\node_modules\#angular\core\__ivy_ngcc__\fesm2015\core.js:29159
zUnb # c:\nodejs\pt-web\src\main.ts:11:26
__webpack_require__ # c:\nodejs\pt-web\webpack\bootstrap:84
0 # localhost꞉4200/main.js:11:18
__webpack_require__ # c:\nodejs\pt-web\webpack\bootstrap:84
checkDeferredModules # c:\nodejs\pt-web\webpack\bootstrap:45
webpackJsonpCallback # c:\nodejs\pt-web\webpack\bootstrap:32
<anonymous> # localhost꞉4200/main.js:1:57
[WDS] Live Reloading enabled.
package.json
{
"name": "mega-able",
"version": "1.3.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"#agm/core": "^1.1.0",
"#angular/animations": "^11.1.2",
"#angular/common": "^11.1.2",
"#angular/compiler": "^11.1.2",
"#angular/core": "^11.2.7",
"#angular/fire": "^6.1.4",
"#angular/forms": "^11.1.2",
"#angular/localize": "^11.2.7",
"#angular/platform-browser": "^11.1.2",
"#angular/platform-browser-dynamic": "^11.1.2",
"#angular/router": "^11.1.2",
"#fullcalendar/angular": "^5.6.0",
"#fullcalendar/core": "^5.6.0",
"#fullcalendar/daygrid": "^5.6.0",
"#fullcalendar/interaction": "^5.6.0",
"#fullcalendar/timegrid": "^5.6.0",
"#ng-bootstrap/ng-bootstrap": "^7.0.0",
"#swimlane/ngx-datatable": "^17.1.0",
"angular": "^1.8.2",
"angular-archwizard": "^6.1.0",
"angular-datatables": "^9.1.1",
"angular-pell": "^0.1.0",
"angular-tree-component": "^8.5.6",
"angular2-chartjs": "^0.5.1",
"angular2-text-mask": "^9.0.0",
"bootstrap": "^4.6.0",
"c3": "^0.7.20",
"d3": "^5.16.0",
"datatables.net": "^1.10.24",
"datatables.net-buttons": "^1.7.0",
"datatables.net-buttons-dt": "^1.7.0",
"datatables.net-colreorder": "^1.5.3",
"datatables.net-dt": "^1.10.24",
"datatables.net-responsive": "^2.2.7",
"datatables.net-select": "^1.3.3",
"famfamfam-flags": "^1.0.0",
"firebase": "^8.3.1",
"firebaseui": "^4.8.0",
"font-awesome-scss": "^1.0.0",
"fullcalendar": "^5.6.0",
"hammerjs": "^2.0.8",
"jquery": "^3.6.0",
"jszip": "^3.6.0",
"netmask": "^2.0.1",
"ng-click-outside": "^6.0.0",
"ng-select": "^1.0.2",
"ng2-currency-mask": "^9.0.2",
"ng2-dragula": "^1.5.0",
"ng2-file-upload": "^1.4.0",
"ng2-google-charts": "^6.1.0",
"ng2-nouislider": "^1.8.3",
"ng2-toasty": "^4.0.3",
"ngx-bar-rating": "^1.1.0",
"ngx-chips": "^2.2.2",
"ngx-color-picker": "^9.1.0",
"ngx-custom-validators": "^9.1.0",
"ngx-lightbox": "^2.2.2",
"ngx-perfect-scrollbar": "^8.0.0",
"node-sass": "^4.14.1",
"nouislider": "^14.6.4",
"rxjs": "^6.6.7",
"rxjs-compat": "^6.6.7",
"screenfull": "^5.1.0",
"sweetalert2": "^9.17.2",
"text-mask-addons": "^3.8.0",
"tslib": "^2.1.0",
"zone.js": "~0.10.3"
},
"devDependencies": {
"#angular-devkit/architect": "^0.1102.6",
"#angular-devkit/build-angular": "^0.1101.4",
"#angular/cli": "^11.2.6",
"#angular/compiler-cli": "^11.1.2",
"#types/datatables.net": "^1.10.19",
"#types/datatables.net-buttons": "^1.4.5",
"#types/jasmine": "^3.6.9",
"#types/jasminewd2": "~2.0.3",
"#types/jquery": "^3.5.5",
"#types/node": "^12.20.7",
"codelyzer": "^6.0.1",
"firebase-tools": "^9.8.0",
"fuzzy": "^0.1.3",
"inquirer": "^6.2.2",
"inquirer-autocomplete-prompt": "^1.0.1",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.2.3",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"open": "^7.4.2",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"tslint": "^6.1.3",
"typescript": "4.1.2"
}
}
main.ts
import { enableProdMode } from '#angular/core';
import { platformBrowserDynamic } from '#angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
if (environment.production) {
enableProdMode();
}
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
I'm completely lost now, hoping someone here can see the obvious thing I'm sure I am missing

Check angular and firebase #angular/fire compatibility issues
AngularFire doesn't follow Angular's versioning as Firebase also has breaking changes throughout the year. Instead we try to maintain compatibility with both Firebase and Angular majors for as long as possible, only breaking when we need to support a new major of one or the other.
See here:
https://github.com/angular/angularfire#compatibility

Related

Build error after upgrading to Expo SDK 47(TypeError,Invariant Violation)

Summary:
I upgrade the Enatega Customer app from SDK 44 to 47. I expect the app is be built successfully.
Managed or bare workflow?
Expo Managed Project
What platform(s) does this occur on?
Both Android and iOS.
SDK Version
expo '47.0.0'
**
Reproducible demo or steps to reproduce from a blank project**
I upgraded my SDK from 44 to 47, using npm i -g expo-cli and expo upgrade, and make a expo publish and npx expo start as are made others many times.
**
The error occurs in node_modules(TypeError,Invariant Violation)**
TypeError: undefined is not an object (evaluating '_reactNative.Text.propTypes.style') at node_modules/react-native/Libraries/Core/ExceptionsManager.js:95:17 in reportException at node_modules/react-native/Libraries/Core/ExceptionsManager.js:141:19 in handleException at node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:39 in handleError at node_modules/expo/build/errors/ExpoErrorManager.js:25:19 in errorHandler at node_modules/expo/build/errors/ExpoErrorManager.js:30:24 in at node_modules/#react-native/polyfills/error-guard.js:49:36 in ErrorUtils.reportFatalError at node_modules/metro-runtime/src/polyfills/require.js:237:40 in guardedLoadModule at http://10.97.28.19:19000/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false&strict=false&minify=false:null in global code
Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter. A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native. at node_modules/react-native/Libraries/Core/ExceptionsManager.js:95:17 in reportException at node_modules/react-native/Libraries/Core/ExceptionsManager.js:141:19 in handleException at node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:39 in handleError at node_modules/expo/build/errors/ExpoErrorManager.js:25:19 in errorHandler at node_modules/expo/build/errors/ExpoErrorManager.js:30:24 in at node_modules/#react-native/polyfills/error-guard.js:49:36 in ErrorUtils.reportFatalError
Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter. A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native. at node_modules/react-native/Libraries/Core/ExceptionsManager.js:95:17 in reportException at node_modules/react-native/Libraries/Core/ExceptionsManager.js:141:19 in handleException at node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:39 in handleError at node_modules/expo/build/errors/ExpoErrorManager.js:25:19 in errorHandler at node_modules/expo/build/errors/ExpoErrorManager.js:30:24 in at node_modules/#react-native/polyfills/error-guard.js:49:36 in ErrorUtils.reportFatalError
How to solve this issue?
My Package.json File
{
"name": "enatega-full-app",
"version": "5.0.0",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"eject": "expo eject",
"test": "jest",
"format": "prettier --write '**/*.js'",
"lint:fix": "eslint . --ext .js --fix",
"postinstall": "patch-package"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.js": [
"npm run format",
"npm run lint:fix"
]
},
"dependencies": {
"#apollo/react-hooks": "^3.1.3",
"#expo/vector-icons": "^12.0.0",
"#ptomasroos/react-native-multi-slider": "^2.2.2",
"#react-native-async-storage/async-storage": "~1.15.0",
"#react-native-community/masked-view": "0.1.10",
"#react-navigation/drawer": "^5.12.5",
"#react-navigation/native": "^5.9.4",
"#react-navigation/stack": "^5.14.5",
"apollo-boost": "^0.3.1",
"apollo-cache-inmemory": "^1.5.1",
"apollo-cache-persist": "^0.1.1",
"apollo-client": "^2.5.1",
"apollo-link-context": "^1.0.17",
"apollo-link-http": "^1.5.14",
"apollo-link-state": "^0.4.2",
"apollo-link-ws": "^1.0.20",
"apollo-upload-client": "^10.0.0",
"expo": "^44.0.0",
"expo-analytics-amplitude": "~11.1.0",
"expo-app-auth": "~11.1.0",
"expo-app-loading": "~1.3.0",
"expo-apple-authentication": "~4.1.0",
"expo-application": "~4.0.1",
"expo-asset": "~8.4.6",
"expo-constants": "~13.0.1",
"expo-device": "~4.1.0",
"expo-facebook": "~12.1.0",
"expo-font": "~10.0.4",
"expo-google-app-auth": "~8.3.0",
"expo-image-picker": "~12.0.1",
"expo-linking": "~3.0.0",
"expo-localization": "~12.0.0",
"expo-location": "~14.0.1",
"expo-notifications": "~0.14.0",
"expo-splash-screen": "~0.14.1",
"expo-tracking-transparency": "~2.1.0",
"expo-updates": "~0.11.6",
"graphql": "^14.5.8",
"graphql-tag": "^2.10.1",
"i18n-js": "^3.2.2",
"lodash": "^4.17.21",
"patch-package": "^6.2.2",
"react": "17.0.1",
"react-apollo": "^2.5.8",
"react-native": "0.64.3",
"react-native-flash-message": "^0.1.23",
"react-native-flatlist-slider": "^1.0.5",
"react-native-gesture-handler": "~2.1.0",
"react-native-gifted-chat": "^0.16.3",
"react-native-maps": "0.29.4",
"react-native-material-textfield": "^0.16.1",
"react-native-modal": "^11.10.0",
"react-native-modalize": "^2.0.8",
"react-native-reanimated": "~2.3.1",
"react-native-safe-area-context": "3.3.2",
"react-native-screens": "~3.10.1",
"react-native-star-rating": "^1.1.0",
"react-native-svg": "12.1.1",
"react-native-timeline-flatlist": "^0.7.2",
"react-native-webview": "11.15.0",
"subscriptions-transport-ws": "^0.9.16",
"uuid": "^3.3.2",
"validate.js": "^0.12.0"
},
"devDependencies": {
"babel-jest": "^24.8.0",
"babel-preset-expo": "9.0.2",
"babel-preset-react-native": "^4.0.1",
"eslint": "^7.28.0",
"eslint-config-standard": "^14.1.1",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-react": "^7.20.0",
"eslint-plugin-standard": "^4.0.1",
"husky": "^4.3.8",
"jest": "^26.6.3",
"jest-react-native": "^18.0.0",
"lint-staged": "^10.5.4",
"metro-react-native-babel-preset": "^0.54.1",
"prettier": "^2.3.1",
"prettier-config-standard": "^1.0.1",
"react-test-renderer": "^16.8.6"
},
"jest": {
"preset": "react-native",
"transformIgnorePatterns": [
"node_modules/(?!(react-native|expo|#expo|apollo-boost|apollo-cache-inmemory|apollo-client|apollo-link-context|apollo-link-http|apollo-link-state|apollo-upload-client|graphql|graphql-tag|react-apollo|react-native-animatable|react-native-material-buttons|react-native-material-ripple|react-native-material-textfield|react-native-ratings|react-native-swiper-flatlist|react-native-timeline-listview|react-navigation|validate.js)/)"
]
},
"private": true
}
GitHub:
Only target the Customer App inside this repo
https://github.com/Ninjas-Code-official/Enatega-Restaurant-Solution.git

Implementing Lexical editor on Vue 2

I know there's Lexical-Vue that is built around Vue 3. But I want to try implementing it on Vue 2 app and it's apparently not working well.
The error says I need an appropriate loader for Lexical module but I'm not quite sure what it wants. My questions are, is the error from my Vue code or webpack? if then, what are the suggested solutions?
<template>
<div ref="editorRef"></div>
</template>
<script>
import HelloWorld from './components/HelloWorld'
import { createEditor } from 'lexical'
export default {
name: 'App',
components: {
HelloWorld
},
mounted: function () {
const config = {
namespace: 'lex'
}
const editor = createEditor(config)
editor.setRootElement(this.$refs.editorRef)
}
}
</script>
error in ./node_modules/lexical/Lexical.dev.js
Module parse failed: Unexpected token (8753:13)
You may need an appropriate loader to handle this file type.
|
| exportJSON() {
| return { ...super.exportJSON(),
| type: 'paragraph',
| version: 1
# ./node_modules/lexical/Lexical.js 8:57-84
# ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/App.vue
# ./src/App.vue
# ./src/main.js
# multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js
{
"name": "lexical-test-vue",
"version": "1.0.0",
"description": "A Vue.js project",
"private": true,
"scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "npm run dev",
"lint": "eslint --ext .js,.vue src",
"build": "node build/build.js"
},
"dependencies": {
"lexical": "^0.6.0",
"vue": "^2.5.2"
},
"devDependencies": {
"autoprefixer": "^7.1.2",
"babel-core": "^6.22.1",
"babel-eslint": "^8.2.1",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-loader": "^7.1.1",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-plugin-transform-vue-jsx": "^3.5.0",
"babel-preset-env": "^1.3.2",
"babel-preset-stage-2": "^6.22.0",
"chalk": "^2.0.1",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.0",
"eslint": "^4.15.0",
"eslint-config-standard": "^10.2.1",
"eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^1.7.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-node": "^5.2.0",
"eslint-plugin-promise": "^3.4.0",
"eslint-plugin-standard": "^3.0.1",
"eslint-plugin-vue": "^4.0.0",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.4",
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.30.1",
"node-notifier": "^5.1.2",
"optimize-css-assets-webpack-plugin": "^3.2.0",
"ora": "^1.2.0",
"portfinder": "^1.0.13",
"postcss-import": "^11.0.0",
"postcss-loader": "^2.0.8",
"postcss-url": "^7.2.1",
"rimraf": "^2.6.0",
"semver": "^5.3.0",
"shelljs": "^0.7.6",
"uglifyjs-webpack-plugin": "^1.1.1",
"url-loader": "^0.5.8",
"vue-loader": "^13.3.0",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.5.2",
"webpack": "^3.6.0",
"webpack-bundle-analyzer": "^2.9.0",
"webpack-dev-server": "^2.9.1",
"webpack-merge": "^4.1.0"
},
"engines": {
"node": ">= 6.0.0",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}

Keeps getting cannot Error: Cannot find module from #hookforms/resolver

I am working on a next js project and while refreshing the page i am getting this error. But when i start from beginning that is signing in and then visiting other pages then this error wont appear. But if there is any error in fetching data from api then it appears.
Here's the complete log:
Uncaught Error: Cannot find module 'C:\Users\abhit\Desktop\Minimal_JavaScript_v3.0.0\Minimal_JavaScript_v3.0.0\modified\node_modules\#hookform\resolvers\yup\dist\yup'
at createEsmNotFoundErr (node:internal/modules/cjs/loader:960:15)
at finalizeEsmResolution (node:internal/modules/cjs/loader:953:15)
at resolveExports (node:internal/modules/cjs/loader:483:14)
at Module._findPath (node:internal/modules/cjs/loader:523:31)
at Module._resolveFilename (node:internal/modules/cjs/loader:925:27)
at mod._resolveFilename (file://C:\Users\abhit\Desktop\Minimal_JavaScript_v3.0.0\Minimal_JavaScript_v3.0.0\modified\node_modules\next\dist\build\webpack\require-hook.js:27:32)
at mod._resolveFilename (file://C:\Users\abhit\Desktop\Minimal_JavaScript_v3.0.0\Minimal_JavaScript_v3.0.0\modified\node_modules\next\dist\build\webpack\require-hook.js:27:32)
at mod._resolveFilename (file://C:\Users\abhit\Desktop\Minimal_JavaScript_v3.0.0\Minimal_JavaScript_v3.0.0\modified\node_modules\next\dist\build\webpack\require-hook.js:27:32)
at Module._load (node:internal/modules/cjs/loader:780:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
getServerError # client.js?4d30:7
eval # index.js?46cb:709
setTimeout (async)
Here is my package.json:
{
"name": "apsit-community",
"author": "apsit",
"version": "1.0.0",
"description": "Platform build by students for the students.",
"private": true,
"scripts": {
"lint": "next lint",
"lint:es": "eslint --ext .js,.jsx .",
"lint:fix": "eslint --fix --ext .js,.jsx .",
"dev": "next dev -p 3031",
"build": "next build",
"start": "next start"
},
"dependencies": {
"#auth0/auth0-spa-js": "^1.19.3",
"#emotion/cache": "^11.7.1",
"#emotion/react": "^11.7.1",
"#emotion/server": "^11.4.0",
"#emotion/styled": "^11.6.0",
"#fullcalendar/common": "^5.10.1",
"#fullcalendar/daygrid": "^5.10.1",
"#fullcalendar/interaction": "^5.10.1",
"#fullcalendar/list": "^5.10.1",
"#fullcalendar/react": "^5.10.1",
"#fullcalendar/timegrid": "^5.10.1",
"#fullcalendar/timeline": "^5.10.1",
"#hookform/resolvers": "^2.9.7",
"#iconify/react": "^3.1.0",
"#mui/lab": "^5.0.0-alpha.60",
"#mui/material": "^5.2.4",
"#mui/x-data-grid": "^5.2.1",
"#react-pdf/renderer": "^2.0.21",
"#reduxjs/toolkit": "^1.7.1",
"#turf/bbox": "^6.5.0",
"amazon-cognito-identity-js": "^5.2.3",
"apexcharts": "^3.32.0",
"autosuggest-highlight": "^3.2.0",
"axios": "^0.24.0",
"change-case": "^4.1.2",
"cookie": "^0.4.1",
"d3-array": "^3.1.1",
"d3-scale": "^4.0.2",
"date-fns": "^2.27.0",
"deck.gl": "^8.6.5",
"emoji-mart": "^3.0.0",
"firebase": "^9.6.1",
"framer-motion": "^5.5.5",
"geojson": "^0.5.0",
"highlight.js": "^11.3.1",
"i18next": "^21.6.3",
"i18next-browser-languagedetector": "^6.1.2",
"immutable": "^4.0.0",
"js-cookie": "^3.0.1",
"jsonwebtoken": "^8.5.1",
"jwt-decode": "^3.1.2",
"lodash": "^4.17.19",
"mapbox-gl": "^2.6.1",
"next": "^12.0.7",
"next-transpile-modules": "^9.0.0",
"notistack": "^2.0.3",
"nprogress": "^0.2.0",
"numeral": "^2.0.6",
"prop-types": "^15.8.1",
"react": "^17.0.1",
"react-apexcharts": "^1.3.9",
"react-beautiful-dnd": "^13.1.0",
"react-copy-to-clipboard": "^5.0.4",
"react-dom": "^17.0.2",
"react-dropzone": "^11.4.2",
"react-hook-form": "^7.22.2",
"react-i18next": "^11.15.1",
"react-image-lightbox": "^5.1.4",
"react-lazy-load-image-component": "^1.5.1",
"react-map-gl": "^6.1.18",
"react-markdown": "^7.1.1",
"react-quill": "^2.0.0",
"react-redux": "^7.2.6",
"react-slick": "^0.28.0",
"redux": "^4.1.2",
"redux-persist": "^6.0.0",
"rehype-raw": "^6.1.0",
"simplebar": "^5.3.6",
"simplebar-react": "^2.3.6",
"slick-carousel": "^1.8.1",
"stylis": "^4.0.13",
"stylis-plugin-rtl": "^2.1.1",
"worker-loader": "^3.0.8",
"yup": "^0.32.11"
},
"devDependencies": {
"#next/eslint-plugin-next": "^12.0.7",
"eslint": "^7.32.0",
"eslint-config-next": "^12.0.7",
"eslint-config-prettier": "^8.3.0",
"prettier": "2.5.1",
"typescript": "^4.4.4"
}
}
It's because, you don't have "react-hook-form" So, Try the following:
npm install react-hook-form #hookform/resolvers yup

How to configure Vue with SCSS

The second I change
<style>
to
<style lang="scss">
I start getting errors in the terminal:
18% building modules 74/80 modules 6 active
...vue-router/src/components/Landing.vue(node:30664)
UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]:
The "path" argument must be of type string. Received undefined
at validateString (internal/validators.js:121:11)
at Object.join (path.js:1039:7)
at getSassOptions (/home/dan/working_files/agile/agile-admin-docker/frontend/vue-router/node_modules/sass-loader/dist/utils.js:166:37)
at Object.loader (/home/dan/working_files/agile/agile-admin-docker/frontend/vue-router/node_modules/sass-loader/dist/index.js:43:55)
at LOADER_EXECUTION (/home/dan/working_files/agile/agile-admin-docker/frontend/vue-router/node_modules/loader-runner/lib/LoaderRunner.js:119:14)
at runSyncOrAsync (/home/dan/working_files/agile/agile-admin-docker/frontend/vue-router/node_modules/loader-runner/lib/LoaderRunner.js:120:4)
at iterateNormalLoaders (/home/dan/working_files/agile/agile-admin-docker/frontend/vue-router/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
at iterateNormalLoaders (/home/dan/working_files/agile/agile-admin-docker/frontend/vue-router/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
at /home/dan/working_files/agile/agile-admin-docker/frontend/vue-router/node_modules/loader-runner/lib/LoaderRunner.js:236:3
at Object.context.callback (/home/dan/working_files/agile/agile-admin-docker/frontend/vue-router/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at Object.module.exports (/home/dan/working_files/agile/agile-admin-docker/frontend/vue-router/node_modules/vue-loader/lib/selector.js:21:8)
at LOADER_EXECUTION (/home/dan/working_files/agile/agile-admin-docker/frontend/vue-router/node_modules/loader-runner/lib/LoaderRunner.js:119:14)
at runSyncOrAsync (/home/dan/working_files/agile/agile-admin-docker/frontend/vue-router/node_modules/loader-runner/lib/LoaderRunner.js:120:4)
at iterateNormalLoaders (/home/dan/working_files/agile/agile-admin-docker/frontend/vue-router/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
at /home/dan/working_files/agile/agile-admin-docker/frontend/vue-router/node_modules/loader-runner/lib/LoaderRunner.js:205:4
at /home/dan/working_files/agile/agile-admin-docker/frontend/vue-router/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:70:14
(Use `node --trace-warnings ...` to show where the warning was
created) (node:30664) UnhandledPromiseRejectionWarning: Unhandled
promise rejection. This error originated either by throwing inside of
an async function without a catch block, or by rejecting a promise
which was not handled with .catch(). To terminate the node process on
unhandled promise rejection, use the CLI flag
`--unhandled-rejections=strict` (see
https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode).
(rejection id: 2) (node:30664) [DEP0018] DeprecationWarning: Unhandled
promise rejections are deprecated. In the future, promise rejections
that are not handled will terminate the Node.js process with a
non-zero exit code.
I believe I have installed the dependencies needed, it appear from the trace that sass-loader may be an issue here.
I installed sass using the command
npm install -D sass-loader#^10.1.1 node-sass
Any tips would be much appreciated, as really not sure what the issue could be at this point.
Landing.vue
<template>
<div>
<h1>Agile Admin App</h1>
</div>
</template>
<style lang="scss">
h1 {
border: 1px solid black;
}
</style>
I also figured my package.json file would be of use, as it may be a version issue for something like webpack or sass-loader
{
"name": "myapp",
"version": "1.0.0",
"description": "My App",
"author": "email#email.email",
"private": true,
"scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "npm run dev",
"unit": "jest --config test/unit/jest.conf.js --coverage",
"e2e": "node test/e2e/runner.js",
"test": "npm run unit && npm run e2e",
"lint": "eslint --ext .js,.vue src test/unit test/e2e/specs",
"build": "node build/build.js"
},
"dependencies": {
"axios": "^0.21.1",
"vue": "^2.5.2",
"vue-router": "^3.0.1"
},
"devDependencies": {
"autoprefixer": "^7.1.2",
"babel-core": "^6.22.1",
"babel-eslint": "^8.2.1",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-jest": "^21.0.2",
"babel-loader": "^7.1.1",
"babel-plugin-dynamic-import-node": "^1.2.0",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.0",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-plugin-transform-vue-jsx": "^3.5.0",
"babel-preset-env": "^1.3.2",
"babel-preset-stage-2": "^6.22.0",
"babel-register": "^6.22.0",
"chalk": "^2.0.1",
"chromedriver": "^2.27.2",
"copy-webpack-plugin": "^4.0.1",
"cross-spawn": "^5.0.1",
"css-loader": "^0.28.0",
"eslint": "^4.15.0",
"eslint-config-standard": "^10.2.1",
"eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^1.7.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-node": "^5.2.0",
"eslint-plugin-promise": "^3.4.0",
"eslint-plugin-standard": "^3.0.1",
"eslint-plugin-vue": "^4.0.0",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.4",
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.30.1",
"jest": "^22.0.4",
"jest-serializer-vue": "^0.3.0",
"nightwatch": "^0.9.12",
"node-notifier": "^5.1.2",
"node-sass": "^5.0.0",
"optimize-css-assets-webpack-plugin": "^3.2.0",
"ora": "^1.2.0",
"portfinder": "^1.0.13",
"postcss-import": "^11.0.0",
"postcss-loader": "^2.0.8",
"postcss-url": "^7.2.1",
"rimraf": "^2.6.0",
"sass-loader": "^10.1.1",
"selenium-server": "^3.0.1",
"semver": "^5.3.0",
"shelljs": "^0.7.6",
"uglifyjs-webpack-plugin": "^1.1.1",
"url-loader": "^0.5.8",
"vue-jest": "^1.0.2",
"vue-loader": "^13.3.0",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.5.2",
"webpack": "^3.6.0",
"webpack-bundle-analyzer": "^2.9.0",
"webpack-dev-server": "^2.9.1",
"webpack-merge": "^4.1.0"
},
"engines": {
"node": ">= 6.0.0",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
Did you followed this tutorial? https://vue-loader.vuejs.org/guide/pre-processors.html#sass
You may try
npm install -D sass-loader node-sass
Then, in your webpack config
module.exports = {
module: {
rules: [
// ... other rules omitted
// this will apply to both plain `.scss` files
// AND `<style lang="scss">` blocks in `.vue` files
{
test: /\.scss$/,
use: [
'vue-style-loader',
'css-loader',
'sass-loader'
]
}
]
},
// plugin omitted
}
This should do the trick.
Never got to the bottom of this sadly, even with the suggestions above. Ultimately someone at work suggested copying my custom code out, rebuilding the setup in the cli using vite, then reapplying my work. This appeared to fix the issue.
Doesn't really explain why it broke, but this was the fix in my case.

Webpack Babel - Module build failed: TypeError: Cannot read property 'bindings' of nul

I'm building a new project in VUEJS 2 and am having a issue. I'm fairly new to webpack so I'm learning it as I go. Can you tell me why this section of code throws an error?
./store/modules/user/store.js
const state = {
user: {}
};
Then when it gets compiled, webpack throws these errors:
ERROR Failed to compile with 1 errors 14:21:50
error in ./assets/js/store/modules/user/store.js
Module build failed: TypeError: Cannot read property 'bindings' of null
at Scope.moveBindingTo (c:\myProject\node_modules\#babel\traverse\lib\scope\index.js:978:13)
at BlockScoping.updateScopeInfo (c:\myProject\node_modules\babel-plugin-transform-es2015-block-scoping\lib\index.js:364:17)
at BlockScoping.run (c:\myProject\node_modules\babel-plugin-transform-es2015-block-scoping\lib\index.js:330:12)
at PluginPass.BlockStatementSwitchStatementProgram (c:\myProject\node_modules\babel-plugin-transform-es2015-block-scoping\lib\index.js:70:24)
at newFn (c:\myProject\node_modules\#babel\traverse\lib\visitors.js:237:21)
at NodePath._call (c:\myProject\node_modules\#babel\traverse\lib\path\context.js:65:20)
at NodePath.call (c:\myProject\node_modules\#babel\traverse\lib\path\context.js:40:17)
at NodePath.visit (c:\myProject\node_modules\#babel\traverse\lib\path\context.js:100:12)
at TraversalContext.visitQueue (c:\myProject\node_modules\#babel\traverse\lib\context.js:142:16)
at TraversalContext.visitSingle (c:\myProject\node_modules\#babel\traverse\lib\context.js:102:19)
at TraversalContext.visit (c:\myProject\node_modules\#babel\traverse\lib\context.js:182:19)
at Function.traverse.node (c:\myProject\node_modules\#babel\traverse\lib\index.js:106:17)
at traverse (c:\myProject\node_modules\#babel\traverse\lib\index.js:76:12)
at transformFile (c:\myProject\node_modules\#babel\core\lib\transformation\index.js:116:29)
at runSync (c:\myProject\node_modules\#babel\core\lib\transformation\index.js:45:3)
at runAsync (c:\myProject\node_modules\#babel\core\lib\transformation\index.js:35:14)
at process.nextTick (c:\myProject\node_modules\#babel\core\lib\transform.js:34:34)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
# ./assets/js/store/store.js 3:0-40
# ./assets/js/main.js
Here is my package.json
{
"devDependencies": {
"#symfony/webpack-encore": "^0.17.0",
"#vue/cli-plugin-babel": "^3.0.0-rc.3",
"#vue/test-utils": "^1.0.0-beta.20",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^23.2.0",
"node-sass": "^4.9.0",
"sass-loader": "^7.0.3",
"vue-loader": "^14.1.1",
"vue-template-compiler": "^2.5.16"
},
"license": "UNLICENSED",
"private": true,
"scripts": {
"dev-server": "encore dev-server",
"dev": "encore dev",
"watch": "encore dev --watch",
"build": "encore production"
},
"dependencies": {
"#babel/plugin-syntax-dynamic-import": "^7.0.0-beta.51",
"#coreui/coreui": "^2.0.3",
"#coreui/coreui-plugin-chartjs-custom-tooltips": "^1.2.0",
"#coreui/icons": "0.2.0",
"#coreui/vue": "^2.0.0-rc.0",
"axios": "^0.18.0",
"bootstrap": "^4.1.1",
"bootstrap-vue": "^2.0.0-rc.11",
"chart.js": "^2.7.2",
"core-js": "^2.5.7",
"css-vars-ponyfill": "^1.7.2",
"flag-icon-css": "^3.0.0",
"font-awesome": "^4.7.0",
"jquery": "^3.3.1",
"npm": "^6.4.0",
"perfect-scrollbar": "^1.4.0",
"simple-line-icons": "^2.4.1",
"sweetalert2": "^7.26.11",
"vue": "^2.5.16",
"vue-chartjs": "^3.3.2",
"vue-perfect-scrollbar": "^0.1.0",
"vue-router": "^3.0.1",
"vue-table-component": "^2.0.0-alpha.1",
"vue-tables": "^1.6.44",
"vuetable": "^1.5.12",
"vuex": "^3.0.1"
}
}
I'm assuming i'm missing some sort of babel extension. I've done some research and think it might be something to do with es2015 not being understood in the "store.js" file. Any idea on what I could do fix this? I also noticed I don't have a .babelrc file, is there something I need to put in that so this will work?
I appreciate any help!
I fixed it by just reverting to react-native#0.55.4 for now.I'm also faced error by using (react-native#0.56)#babel/core 7.0.0-beta.