javascript import has as default path the hard disk instead of node_modules

Viewed 67

My problem is that when I do an import the default path is the computer's hard drive. Instead of being node_modules.

In the import of the js file is set "type=module", so that's not the problem.

I have a badly configured Node or NPM, but I really don't know what to do.

In the images you can clearly see when I put "/" and the options appear that I am in the general hard drive of the computer.

image example

image example 2

1 Answers

Go one step back in the path like this: import '../../js.js'

Related