@Vandesm14/

Module Test

Nodejs

No description

fork
loading
Files
  • index.js
  • file.txt
  • moduleA.js
  • moduleB.js

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.1897571622789762","path":"index.js","file":{"path":"index.js","content":{"asEncoding":{"base64":"Y29uc3QgZnMgPSByZXF1aXJlKCdmcycpOwoKdmFyIG1lc3NhZ2UgPSAnSGVsbG8gV29ybGQnOyAvLyBNYWluIFZhcmlhYmxlCnZhciBtb2R1bGVBID0gcmVxdWlyZSgnLi9tb2R1bGVBLmpzJyk7IC8vIGNvbnNvbGUubG9nIG1vZHVsZQp2YXIgbW9kdWxlQiA9IHJlcXVpcmUoJy4vbW9kdWxlQi5qcycpOyAvLyBmcy5yZWFkIG1vZHVsZQoKbW9kdWxlQSgpOyAvLyBTaG91bGQgbG9nICJIZWxsbyBXb3JsZCIgdG8gdGhlIGNvbnNvbGUKbW9kdWxlQSgpOyAvLyBTaG91bGQgbG9nICJUaGlzIGlzIGEgZmlsZSIgdG8gdGhlIGNvbnNvbGU="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
const fs = require('fs');

var message = 'Hello World'; // Main Variable
var moduleA = require('./moduleA.js'); // console.log module
var moduleB = require('./moduleB.js'); // fs.read module

moduleA(); // Should log "Hello World" to the console
moduleA(); // Should log "This is a file" to the console
node v10.16.0