Ten paciencia, soy nuevo en esto. Configuré myapp usando este tutorial: https://code.visualstudio.com/docs/nodejs/nodejs-tutorial y ahora estoy tratando de servir archivos estáticos usando este tutorial: https://expressjs.com/en /starter/static-files.html , pero recibo errores y no sé cómo solucionarlos. Los errores están abajo. Por favor ayuda y gracias!
express.static : The term 'express.static' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:9 + app.use(express.static('public')) + ~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (express.static: String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundExceptionParece que está intentando ejecutar un fragmento de JS como un script de PowerShell.
JS no es PowerShell, por lo que genera errores.
Necesitas: