Skip to content

Error while using Nuxt and peerjs  #952

@rexmalebka

Description

@rexmalebka

while trying to use peer into a nuxt layout ts I got this error:

What can I try to fix this ?

layouts/default.vue

<template> <div> miau {{ peer.id }} </div> </template> <script lang="ts"> import { Peer } from 'peerjs'  export default { data(){ return { peer: new Peer() } } }   </script> 

error log

Loading... ERROR in ./node_modules/peerjs/dist/bundler.cjs 23:10 Module parse failed: Unexpected token (23:10) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders | | const $c29002be8a39421f$export$25be9502477c137d = new class { > isIOS = [ | "iPad", | "iPhone", 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions