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

Failure console #1

Closed
Robka87 opened this issue Oct 3, 2021 · 3 comments
Closed

Failure console #1

Robka87 opened this issue Oct 3, 2021 · 3 comments

Comments

@Robka87
Copy link

Robka87 commented Oct 3, 2021

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/altv/server/resources/sit_01/server/index.js' imported from /home/altv/server/
    at finalizeResolution (internal/modules/esm/resolve.js:265:11)
    at moduleResolve (internal/modules/esm/resolve.js:699:10)
    at defaultResolve (internal/modules/esm/resolve.js:810:11)
    at resolve (embedder_main_5.js:22:16)
    at Loader.resolve (internal/modules/esm/loader.js:86:40)
    at Loader.getModuleJob (internal/modules/esm/loader.js:230:28)
    at Loader.import (internal/modules/esm/loader.js:165:28)
    at embedder_main_5.js:30:35
    at embedder_main_5.js:43:3 {
  code: 'ERR_MODULE_NOT_FOUND'

What the Modul for this plugin?

@Robka87
Copy link
Author

Robka87 commented Oct 3, 2021

Newed Failure:

[17:13:07] Loading resource sit_02
(node:8700) Warning: To load an ES module, set "type": "module" in the package.j son or use the .mjs extension.
(node:8700) Warning: To load an ES module, set "type": "module" in the package.j son or use the .mjs extension.
/home/altv/server/resources/sit_02/server/index.js:1
import * as alt from 'alt-server';
^^^^^^

SyntaxError: Cannot use import statement outside a module
at wrapSafe (internal/modules/cjs/loader.js:979:16)
at Module._compile (internal/modules/cjs/loader.js:1027:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at ModuleWrap. (internal/modules/esm/translators.js:199:29)
at ModuleJob.run (internal/modules/esm/module_job.js:152:23)
at async Loader.import (internal/modules/esm/loader.js:166:24)
at async embedder_main_5.js:30:16
[17:13:07][Error] Failed to load resource sit_02

@jonesXYZ
Copy link

jonesXYZ commented Oct 3, 2021

Wie dumm kann jemand sein?
Du: JA.

@cptprice1139
Copy link
Owner

This is not a failure coming from the code. You need to add the following line to your package.json in your main server directory.

"type": "module"

the line to be added.

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

3 participants