njs
njs copied to clipboard
SyntaxError: Cannot find module "http/hello.js"
My versions.
NGINX_VERSION=1.23.1
NGINX_NJS_VERSION=0.7.6
I have njs trouble. I guess it is about js_import .
http {
js_path "/data/njs/";
js_import hello from http/hello.js;
}
This is the display in /data/njs , with 'tree' command.
.
└── http
└── hello.js
If nginx start, error comes.
nginx: [emerg] SyntaxError: Cannot find module "http/hello.js" in /etc/nginx/:1
I really can not understand why it happens.
How can I fix this ?
Hi @magic-thomas,
Was you able to solve the issue?