You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
controller-939e6d85.js:55854 Uncaught ReferenceError: require is not defined at 7581 (controller-939e6d85.js:55854:1) at __webpack_require__ (bootstrap:19:1) at 6747 (app.component.html:434:34) at __webpack_require__ (bootstrap:19:1) at 4431 (app.module.ts:17:21) at __webpack_require__ (bootstrap:19:1) at __webpack_exec__ (main.ts:7:36) at main.ts:7:36 at __webpack_require__.O (chunk loaded:23:1) at main.ts:7:36
Which version of mind-ar-js are you using? Some time ago I made this project with Angular 13 and mind-ar-ts (a TypeScript porting of mind-ar-js ) and it's working.
Maybe it's cause Angular tries to retrieve Webpack somewhere but in the last version of mind-ar they don't use it anymore. Check #311 . Try to uninstall Webpack and install Vite in your project.
I am trying to use Mind-Ar in a Angular 15 project.
Is there any example of this?
I found this issue #150 from @demisquare and I am trying to replicate.
I installed the libraries :
npm i mind-ar --save npm i aframe --save
I did this on my modules file:
`
import {CUSTOM_ELEMENTS_SCHEMA, NgModule} from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import 'mind-ar/dist/mindar-image.prod.js';
import 'aframe';
import 'mind-ar/dist/mindar-image-aframe.prod.js';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
AppRoutingModule
],
providers: [],
bootstrap: [AppComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class AppModule { }
`
But I got this error on the browser console :
controller-939e6d85.js:55854 Uncaught ReferenceError: require is not defined at 7581 (controller-939e6d85.js:55854:1) at __webpack_require__ (bootstrap:19:1) at 6747 (app.component.html:434:34) at __webpack_require__ (bootstrap:19:1) at 4431 (app.module.ts:17:21) at __webpack_require__ (bootstrap:19:1) at __webpack_exec__ (main.ts:7:36) at main.ts:7:36 at __webpack_require__.O (chunk loaded:23:1) at main.ts:7:36
My example is on this public repository :
https://github.com/danilolr/mind-ar-angular-example
Can someone help me finish this example?
The text was updated successfully, but these errors were encountered: