Lachjames
Lachjames
DIAdiscord.js - Imagine an app
Created by Lachjames on 10/18/2023 in #djs-voice
[commonjs] Unexpected token
Hi 🙂 I'm working on a Discord integration for Foundry VTT, and I'm having an issue with getting discord.js to play nice with my toolchain. I'm getting this error when I try to build:
yarn run v1.22.19
warning package.json: "dependencies" has dependency "discord.js" with range "^14.13.0" that collides with a dependency in "devDependencies" of the same name with version "^14.11.0"
warning ../../../../package.json: No license field
$ tsc && vite build --watch
1
vite v3.1.0 building for production...

watching for file changes...

build started...
✓ 2455 modules transformed.
[commonjs] Unexpected token
file: ~/Documents/dev/foundry/foundry-ai-dev/node_modules/discord.js/src/client/actions/InteractionCreate.js:430:8
428: route;
429: majorParameter;
430: global;
^
431: constructor({ timeToReset, limit, method, hash, url, route, majorParameter, global }) {
432: super();
transforming (3053) node_modules/@discordjs/voice/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCo
yarn run v1.22.19
warning package.json: "dependencies" has dependency "discord.js" with range "^14.13.0" that collides with a dependency in "devDependencies" of the same name with version "^14.11.0"
warning ../../../../package.json: No license field
$ tsc && vite build --watch
1
vite v3.1.0 building for production...

watching for file changes...

build started...
✓ 2455 modules transformed.
[commonjs] Unexpected token
file: ~/Documents/dev/foundry/foundry-ai-dev/node_modules/discord.js/src/client/actions/InteractionCreate.js:430:8
428: route;
429: majorParameter;
430: global;
^
431: constructor({ timeToReset, limit, method, hash, url, route, majorParameter, global }) {
432: super();
transforming (3053) node_modules/@discordjs/voice/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCo
4 replies