E
E
explicit12021-07-13 14:16:27
JavaScript
explicit1, 2021-07-13 14:16:27

What is package.json and where is it located?

When I try to connect the module: I get the following error:
import {bigOak} from "./crow-tech";

Process exited with code 1
(node:13251) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)

If I understand correctly, package.json is some kind of configuration file for vscode and you need to enter "type": "module" there. But where is it to be found?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Victor L, 2021-07-13
@Fzero0

and if so?
var bigOak = require('./crow-tech');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question