Skip to the content ForoHackers
Log inJoin

ERR_MODULE_NOT_FOUND importando el fichero que tengo delante. Se llama ordago.mjs, lo juro

DebuggingJavaScript and TypeScriptRuntimes
#15707 · · Quote · Report

Node 20. Dos ficheros en una carpeta: run.mjs y ordago.mjs. En el primero: import { ordago } from "./ordago". Dice ERR_MODULE_NOT_FOUND. Estoy mirando el fichero. El fichero me está mirando a mí. Prefería cuando el JavaScript sólo insultaba al abrir la consola.

#15956 · · Quote · Report

Try the exact filename in your relative import, including .mjs. Did the old project have a bundler filling that in for you?

#15957 · · Quote · Report

era eso. ahora que lo dices en aquel proyecto también podía importar un dibujo de una vaca y salía un dibujo de una vaca. acabo de descubrir quién estaba haciendo mi puto trabajo.

#15958 · · Quote · Report

ty. siete resultados de búsqueda y en todos me mandaban borrar las dependencias. aquí estaba importando un fichero mío, no tengo ni carpeta de dependencias.

#15968 · · Quote · Report

sí, el siguiente resultado de buscarlo era cambiarme de editor. con el precio de un editor nuevo me compro una silla y hemos vuelto al problema del otro día.

#15969 · · Quote · Report

I'd take that receipt. New editor, same missing dot and three extra panels from which to view it.

You are not logged in, so this goes up anonymously: no account, no name and no address is stored with it, and it may carry no link and no image. Log in or join to post under your name. Our web server's logs keep the address and time of every request for up to 14 days; to keep yours out of them, use Tor. To reach the staff in confidence, use the drop. Sign as a returning source (a key kept only in this browser)

Sending takes a few seconds here: your browser first works out a proof of work against spam.

Reply