JavaScript Answers

How to fix Node.js not found?

Spread the love

To fix Node.js not found, we expose the folder with as the static folder.

For instance, we write

app.use(express.static(path.join(__dirname, "/")));

to call express.static to expose the root folder as the static folder.

And then we can put there and use it in a script tag like

<script src="//"></script>

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published.