thomas-crane / nrelay

A console based modular client for Realm of the Mad God built with Node.js and TypeScript.
https://nrelay.net/
MIT License
40 stars 21 forks source link

Discord.js causes build error #45

Closed Cash-Money-McCoy closed 4 years ago

Cash-Money-McCoy commented 4 years ago

Version info

Plugins

Steps to reproduce

  1. Write a plugin that imports Discord from 'discord.js'
  2. Attempt to build
  3. Error

Result

nrelay ERR! code Error
nrelay ERR! message Command failed: npm run compile
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! realm@ compile: `tsc -p .`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the realm@ compile script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\C\AppData\Roaming\npm-cache\_logs\2020-04-30T19_02_02_511Z-debug.log

> realm@ compile C:\Users\C\Desktop\nrelay\realm
> tsc -p .

node_modules/discord.js/typings/index.d.ts(18,30): error TS7016: Could not find a declaration file for module 'ws'. 'C:/Users/C/Desktop/nrelay/realm/node_modules/ws/index.js' implicitly has an 'any' type.
  Try `npm install @types/ws` if it exists or add a new declaration (.d.ts) file containing `declare module 'ws';`

nrelay ERR! Error: Command failed: npm run compile
nrelay ERR! npm ERR! code ELIFECYCLE
nrelay ERR! npm ERR! errno 2
nrelay ERR! npm ERR! realm@ compile: `tsc -p .`
nrelay ERR! npm ERR! Exit status 2
nrelay ERR! npm ERR! 
nrelay ERR! npm ERR! Failed at the realm@ compile script.
nrelay ERR! npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
nrelay ERR!
nrelay ERR! npm ERR! A complete log of this run can be found in:
nrelay ERR! npm ERR!     C:\Users\C\AppData\Roaming\npm-cache\_logs\2020-04-30T19_02_02_511Z-debug.log
nrelay ERR!
nrelay ERR!
nrelay ERR! > realm@ compile C:\Users\C\Desktop\nrelay\realm
nrelay ERR! > tsc -p .
nrelay ERR!
nrelay ERR! node_modules/discord.js/typings/index.d.ts(18,30): error TS7016: Could not find a declaration file for module 'ws'. 'C:/Users/C/Desktop/nrelay/realm/node_modules/ws/index.js' implicitly has an 'any' type.
nrelay ERR!   Try `npm install @types/ws` if it exists or add a new declaration (.d.ts) file containing `declare module 'ws';`
nrelay ERR!
nrelay ERR!     at makeError (C:\Users\C\AppData\Roaming\npm\node_modules\nrelay-cli\node_modules\execa\index.js:174:9)
nrelay ERR!     at Promise.all.then.arr (C:\Users\C\AppData\Roaming\npm\node_modules\nrelay-cli\node_modules\execa\index.js:278:16)
nrelay ERR!     at process._tickCallback (internal/process/next_tick.js:68:7)
YemelesBank commented 4 years ago

This issue has absolutely nothing to do with NRelay. Did you try reading the log and doing as they tell you to do? Try "npm install @types/ws" if it exists or add a new declaration (.d.ts) file containing "declare module 'ws'"; Thanks.

Cash-Money-McCoy commented 4 years ago

Ah my bad