Package import doesn't work this way for nodejs in case of nodejs working I write below first of all install your package and then import nodejs main file an then using import package module.
const importName = require("schema/index.js");
this is the way for import external code there is your javascript import aand create module syntex not working