Learning NodeJS

I’ve been trying to learn the Wappler’s use of NodeJS. It’s a slow go for me, however I was making some really good progress today. That is until this happened:

[nodemon] starting node ./index.js
server-connect:setup:config {
server-connect:setup:config port: 3000,
server-connect:setup:config debug: true,
server-connect:setup:config secret: ‘Rwy4adj9AzEfAHD’,
server-connect:setup:config tmpFolder: ‘/Users/jrblaxmacbookpro/Desktop/Sites/blaxstud-jrblack-info/tmp’,
server-connect:setup:config createApiRoutes: true,
server-connect:setup:config enableCron: false,
server-connect:setup:config enableSockets: false,
server-connect:setup:config compression: true,
server-connect:setup:config static: { index: false },
server-connect:setup:config session: {
server-connect:setup:config name: ‘blaxstud_jrblack_info.sid’,
server-connect:setup:config resave: false,
server-connect:setup:config saveUninitialized: false
server-connect:setup:config },
server-connect:setup:config cors: {
server-connect:setup:config origin: false,
server-connect:setup:config methods: ‘GET,POST’,
server-connect:setup:config allowedHeaders: ‘*’,
server-connect:setup:config credentials: true
server-connect:setup:config },
server-connect:setup:config mail: {},
server-connect:setup:config auth: {},
server-connect:setup:config db: {}
server-connect:setup:config } +0ms
/Users/jrblaxmacbookpro/Desktop/Sites/blaxstud-jrblack-info/lib/formatters/.string 2.js.icloud:1
bplist00�\NSURLNameKey_NSURLFileSizeKey_NSURLFileResourceTypeKey[string 2.jsE_NSURLFileResourceTypeRegula/JVY

SyntaxError: Invalid or unexpected token
at Module._compile (internal/modules/cjs/loader.js:895:18)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Function.Module._load (internal/modules/cjs/loader.js:727:14)
at Module.require (internal/modules/cjs/loader.js:852:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object. (/Users/jrblaxmacbookpro/Desktop/Sites/blaxstud-jrblack-info/lib/core/parser.js:90:35)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
[nodemon] app crashed - waiting for file changes before starting…

Any help would be appreciated. Thanks!

Did this happen in your browser?

No, it happened in Wappler. In the window at the bottom of the code area.

The last line in the error message is confusing:

[nodemon] app crashed - waiting for file changes before starting…

I have had the same problem. The problem with NodeJS: the server needs to be restarted when changes are made. Normally Wappler will do the restarting automatically through nodemon; sometimes, nodemon gets confused and Wappler needs to be restarted, or at the very least, make another minor change, like adding a space, and all is well.

2 Likes

Thanks Ben. I restarted it. However, I will restart it again.

I found the issue. It was some links that I put in the two layout pages. Once I removed them, and then restarted Wappler and the app three or four times, everything resumed perfectly.

Thanks for your help!

<script src="dmxAppConnect/dmxAnimateCSS/dmxAnimateCSS.js" defer=""></script>
<link rel="stylesheet" href="dmxAppConnect/dmxPreloader/dmxPreloader.css" />
<script src="dmxAppConnect/dmxPreloader/dmxPreloader.js" defer=""></script>
2 Likes

When I get ready to upload the files to the remote domain web server (Bluehost), am I to add to the Remote Folder: /app ?

Bluehost uses cPanel type file system…

Have a look at

Thanks Ben. After several attempts without success, I chatted with techs at Bluehost and they tell me that my private network server does not permit NodeJS. According to the techie, I will have to migrate to new account in order to utilize NodeJS.

1 Like