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

请问为什么会提示uncaughtException ReferenceError: version is not defined #659

Open
chenadian1 opened this issue Dec 31, 2024 · 0 comments

Comments

@chenadian1
Copy link

能正常运行,但是不知道为什么会报错

`const NodeMediaServer = require('node-media-server');

const config = {
rtmp: {
port: 1935,
chunk_size: 60000,
gop_cache: true,
ping: 60,
ping_timeout: 30
},
http: {
port: 8000,
allow_origin: '*',
mediaroot: './media',
},
trans: {
ffmpeg: 'D:/ffmpeg-7.0.2-essentials_build/bin/ffmpeg.exe',
tasks: [{
app: 'live',
mp4: true,
mp4Flags: '[movflags=frag_keyframe+empty_moov]',
}]
}
};

var nms = new NodeMediaServer(config);
nms.run();`

cmd:
2024/12/31 14:33:29 9792 [INFO] Node Media Server v2.7.4
2024/12/31 14:33:29 9792 [INFO] Node Media Rtmp Server started on port: 1935
2024/12/31 14:33:29 9792 [INFO] Node Media Http Server started on port: 8000
2024/12/31 14:33:29 9792 [INFO] Node Media WebSocket Server started on port: 8000
2024/12/31 14:33:29 9792 [ERROR] uncaughtException ReferenceError: version is not defined
at NodeTransServer.run (C:\Users\adian\Desktop\rtmp\node_modules\node-media-server\src\node_trans_server.js:45:132)
at NodeMediaServer.run (C:\Users\adian\Desktop\rtmp\node_modules\node-media-server\src\node_media_server.js:40:18)
at Object. (C:\Users\adian\Desktop\rtmp\app.js:27:5)
at Module._compile (node:internal/modules/cjs/loader:1196:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1250:10)
at Module.load (node:internal/modules/cjs/loader:1074:32)
at Function.Module._load (node:internal/modules/cjs/loader:909:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:22:47

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