Answers for "SyntaxError: Cannot use import statement outside a module node js"

0

SyntaxError: Cannot use import statement outside a module node js

// Note: "import" should generally be used for modules/package projects, otherwise use
// "require"
// In your NodeJS project's package.json add the following "type" field to allow use of "import":
{
  "type": "module"
}
Posted by: Guest on August-30-2021
0

node.js error cannot use import outside of module

<script type="module" src="source.js"></script>
Posted by: Guest on August-09-2021

Code answers related to "SyntaxError: Cannot use import statement outside a module node js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language