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

  • Home
  • SEARCH
  • 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 8177473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:31:09+00:00 2026-06-06T23:31:09+00:00

i am attempting to use elementtree in my node js server however the following

  • 0

i am attempting to use elementtree in my node js server
however the following message is genearted on server startup

Cannot find module 'sax'

i had to install elementree from zip, what have i done wrong?

these are my rquire statements

var cache = require('./node_modules/node-cache');

var elementTree = require('./node_modules/node-elementtree');

this is my folder structure

module\node_modules\node-cache

module\node_modules\node-elementtree

my server js script resides in \module

  • 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-06T23:31:11+00:00Added an answer on June 6, 2026 at 11:31 pm

    The problem is because you are not using npm for installing your node-elementtree module

    This is the package.json of node-elementtree. and it is clearly mentioned that there is a dependency on sax 0.3.5

    "dependencies" : {
        "sax": "0.3.5"
      }
    

    Incase if you had done npm install it would have resolved your dependency constraints.

    Inside your node-elementtree module it uses sax here and your require didn’t resolve to a proper module. Hence the error. Incase you can’t use npm then install sax too using zip if possible but it may increase your dependency list once again as the above. So, Try resolving npm issue

    Also you don’t need to use

    var cache = require('./node_modules/node-cache');
    var elementTree = require('./node_modules/node-elementtree');
    

    in your code

    var cache = require('node-cache');
    var elementTree = require('node-elementtree');
    

    the above would do. Node automatically locates the module from ./node_modules directory and even from many more places

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

Sidebar

Related Questions

When attempting to use HttpWebRequest to retrieve a page from my dev server, I
I am attempting to use the following code to search a database using words
I'm attempting to use the new Storyboard feature, however I am confused about Storyboard
Attempting to use a custom hex color for my css triangle (border). However since
I am attempting to use the MediaStore.ACTION_VIDEO_CAPTURE in my app, see code below. However,
I am attempting to use PHP to edit the DOM document tree. However, I
I'm attempting to use Node.js with Socket.IO to faciliate messaging between the browser and
I'm attempting to use the following code to serialize an anonymous type to JSON:
I am attempting to use the 'tempfile' module for manipulating and creating text files.
We are attempting to use a SQL Server 2003 database for our test records

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.