GUVI
Back

Javascript -compilation error

Created 3 years ago
428 Views
7 Comments
DeepaVaradarajan
@DeepaVaradarajan
DeepaVaradarajan
@DeepaVaradarajanProfile is locked. Login

Am trying the run a sample code in javascript, Following is the error I observe . how to fix it

>>> /box/main.js:1
(function (exports, require, module, __filename, __dirname) { 
                                                              ^

SyntaxError: Unexpected token <
    at createScript (vm.js:74:10)
    at Object.runInThisContext (vm.js:116:10)
    at Module._compile (module.js:588:28)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
    at Function.Module.runMain (module.js:665:10)
    at startup (bootstrap_node.js:201:16)
    at bootstrap_node.js:626:3

Code used:

<!DOCTYPE html>

<html>

<body>

<script>

console.log('GUVI');

</script>

</body>

</html>

Comments (7)
Please login to comment.
 
Powered by habitate.io Habitate