Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8077085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:24:09+00:00 2026-06-05T15:24:09+00:00

I am trying to run a nodeJS test script with socket.io but the deployed

  • 0

I am trying to run a nodeJS test script with socket.io but the deployed script on my server causes an error if I am trying to include any javascript.

Just calling the HTML via nginx on my localhost does not throw any error.

this is my index.html:

<!DOCTYPE HTML>
<html>
<head>
    <meta charset="UTF-8" />
    <title>NodeJS Realtime Test</title>
    <script type="text/javascript" src="/client/app.js"></script>
</head>
<body>
    <p>Moin!</p>
</body>
</html>

and this is the content of the app.js:

console.log("test");

Chrome throws me this error:

Uncaught SyntaxError: Unexpected token < app.js:1

In Opera, the error is:

Syntax error at line 1 while loading: expected expression, got '<'  Linked script compilation   app.js

also, the debugger shows that the error occurs on char one of my index.html file.
what am I missing here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T15:24:10+00:00Added an answer on June 5, 2026 at 3:24 pm

    Thanks to the comment of Jani Hartikainen I recognized that it was a misconfiguration of the nodeJS server.

    The example I used served index.html on any request on the server.
    It works using this configuration: https://gist.github.com/701407

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to run some nodejs apps in Notepad++ . I installed NppExec and
Trying to run Jison unit tests, but the command fails. How do I fix
Im trying to run a shell with cakephp but I'm not able to do
I'm trying to run this test: self.assertRaises(AttributeError, branch[0].childrennodes) , and branch[0 ] does not
I'm trying to create a nodejs server where I'm running a simple x/y world,
I've been trying to understand how I can force synchronicity in nodejs but I've
I'm trying to run the Fair Scheduler, but it's not assigning Map tasks to
I am trying to run a hello world program written in javascript in a
I am trying to run commands on Windows via NodeJS child processes: var terminal
a few months ago I've made it using Wamp Server but now I'm trying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.