Giter Club home page Giter Club logo

Comments (8)

mikewesthad avatar mikewesthad commented on May 21, 2024

Hi @wristork, can you share a link to a minimal project setup where this error occurs?

from navmesh.

wristork avatar wristork commented on May 21, 2024

I'm sorry to be late with the reply. Project: https://github.com/wristork/phaser-navmesh-test.

Just webpack template from here https://github.com/photonstorm/phaser3-project-template

from navmesh.

hendrikras avatar hendrikras commented on May 21, 2024

@wristork the link does not work.

I am having similar issues and have reproduced the problem here:
https://github.com/hendrikras/phaser3-typescript-starter-kit

any help would be greatly appreciated.

from navmesh.

kirabook avatar kirabook commented on May 21, 2024

I'm also running into this issue and couldn't find any solutions. I'm not used to managing my project via npm, but I compared my packages to the examples and it doesn't appear I'm missing any dependencies or anything. I haven't actually included any code yet. I've also created a temporary repository for this, but I don't want to keep it up too long.

https://github.com/kirabook/temporary-1
navmesherror

(Also, though this is probably a different issue, I'm also running into an error when trying to use the non-npm version.)
typerror

from navmesh.

plepers avatar plepers commented on May 21, 2024

Hi,
The 3 libraries are built using TS "ESNext" output and the built files contain class properties declarations.
It looks like this relativly recent ES feature is not supported on some webpack/babel setups.
I tried to add @babel/plugin-proposal-class-properties to my project without success. I'm not sure node_modules's files are processed by babel in my case.
Anyway, i solved the issue by rebuilding the library from sources, replacing tsconfig's output by "ES2021".
Hope it helps

from navmesh.

TheChemist avatar TheChemist commented on May 21, 2024

I'm having the problem @hendrikras mentioned as well.

@plepers Can you describe, how you built the libaries yourself?

from navmesh.

brodynelson avatar brodynelson commented on May 21, 2024

Hi,

I am also having this issue with the latest version.

error - ./node_modules/phaser-navmesh/dist/phaser-navmesh-plugin.js 1:4581
Module parse failed: Unexpected token (1:4581)

I have tried installing a typescript and javascript project. Any help would be much appreciated.

Thanks,

BN

from navmesh.

hankyu1 avatar hankyu1 commented on May 21, 2024

@brodynelson
This is what I did to build it locally:

  1. cone navmesh repo and npm install
  2. go to /packages and find the library you need to build. For me I want to use the phaser 3 package so it would be phaser-navmesh
  3. inside the folder, find tsconfig.json and changed the target to ES6
  4. go back to root and run npm run build:libs
  5. once its done, go back to the library folder and you should find a dist folder in it. You can now import whatever is in it into your phaser project

from navmesh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.