Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module upon startup v3.0.0 #167

Open
prenetic opened this issue Apr 1, 2023 · 1 comment
Open

Cannot find module upon startup v3.0.0 #167

prenetic opened this issue Apr 1, 2023 · 1 comment

Comments

@prenetic
Copy link

prenetic commented Apr 1, 2023

Windows Server 2022 21H2
Node.js 18.15.0
Yarn 1.22.19
discord-soundbot 3.0.0

With my current installation, as well as a fresh copy of the 3.0.0 release .zip, I receive the error Cannot find module '~/util/Container' upon startup. Below are complete logs from yarn install through yarn start. The file dist/src/util/Container.js exists relative to the package's root path.

C:\Program Files (User)\discord-soundbot-3.0.0>yarn install
yarn install v1.22.19
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[4/5] Linking dependencies...
[5/5] Building fresh packages...
Done in 42.57s.

C:\Program Files (User)\discord-soundbot-3.0.0>yarn start
yarn run v1.22.19
$ npm run build && npm run serve

> discord-soundbot@main build
> tsc -p tsconfig.json && tsconfig-replace-paths -p tsconfig.json

Replaced 0 paths in 0 files

> discord-soundbot@main serve
> node dist/bin/soundbot.js

node:internal/modules/cjs/loader:1078
  throw err;
  ^

Error: Cannot find module '~/util/Container'
Require stack:
- C:\Program Files (User)\discord-soundbot-3.0.0\dist\bin\soundbot.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (C:\Program Files (User)\discord-soundbot-3.0.0\dist\bin\soundbot.js:7:37)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Program Files (User)\\discord-soundbot-3.0.0\\dist\\bin\\soundbot.js'
  ]
}

Node.js v18.15.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

C:\Program Files (User)\discord-soundbot-3.0.0>
@prenetic
Copy link
Author

prenetic commented Jul 31, 2023

Still an issue with the latest commit (bdbe17f).

Contents of C:\Program Files (User)\discord-soundbot\src\util:

2023-03-31  20:59    <DIR>          .
2023-03-31  20:59    <DIR>          ..
2023-03-31  20:59             2,908 Container.ts
2023-03-31  20:59    <DIR>          db
2023-03-31  20:59             1,241 Errors.ts
2023-03-31  20:59               687 getSecondsFromTime.ts
2023-03-31  20:59    <DIR>          i18n
2023-03-31  20:59               899 SoundUtil.ts
2023-03-31  20:59    <DIR>          __mocks__
2023-03-31  20:58    <DIR>          __test__

Contents of C:\Program Files (User)\discord-soundbot\dist\src\util:

2023-03-31  22:11    <DIR>          .
2023-03-31  22:11    <DIR>          ..
2023-07-30  17:00             3,269 Container.js
2023-03-31  22:11    <DIR>          db
2023-03-31  22:11             2,192 Errors.js
2023-03-31  22:11               759 getSecondsFromTime.js
2023-03-31  22:11    <DIR>          i18n
2023-07-30  17:00             1,505 SoundUtil.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant