Jump to content


Photo
Question

Module not found...?

node.js node-steamcommunity

Best Answer The Professi0nal , 06 September 2018 - 07:11 PM

You shouldn't install steamcommunity globally. Install it locally in the directory where your project lives.

Thank you, Dr. I knew I was doing something wrong but couldn't figure it out. 

Go to the full post


  • Please log in to reply
2 replies to this topic

#1 The Professi0nal

The Professi0nal

    Newbie

  • Member
  • Pip
  • 2 posts

Posted 06 September 2018 - 02:33 AM

I'm attempting to get a bot working from the tutorial located at https://github.com/a...ode-steam-guide, but I seem to have run into a problem. I've been trying for several hours to get the bot to recognize the "steamcommunity" module on chapter 2.2, but nothing I've tried has worked. I've tried everything from redownloading the associated module to a full reinstall of everything related to the bot. Any help would greatly be appreciated. 

 

The error I get upon attempting to debug using my editor 

 

 

 

C:\Program Files\nodejs\node.exe --inspect-brk=31215 project2.js 

Debugger listening on ws://127.0.0.1:31215/2c8dd882-26aa-4ce1-8981-1bc1e13f131a
Debugger attached.
module.js:549
    throw err;
    ^
 
Error: Cannot find module 'steamcommunity'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (c:\Users\Josh\Desktop\bot trick\project2.js:3:24)
    at Module._compile (module.js:649:14)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
Waiting for the debugger to disconnect...
Error: Cannot find module 'steamcommunity'
module.js:547
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (c:\Users\Josh\Desktop\bot trick\project2.js:3:24)
    at Module._compile (module.js:649:14)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)

 

Copied directly from my editor, I narrowed the issue down to line 3 in a previous test, but haven't been able to figure it out. 

 

 

const SteamUser = require('steam-user');

const SteamTotp = require('steam-totp');
const SteamCommunity = require('steamcommunity');
const TradeOfferManager = require('steam-tradeoffer-manager');
const client = new SteamUser();
const community = new SteamCommunity();
const manager = new TradeOfferManager({
    steam: client,
    community: community,
    language: 'en'
});

 

The first screenshot shows the admin console with the command I used to download the module as well as the node_modules and steamcommunity folders.
The second screenshot shows the output of the node.js window. 

Attached Files



#2 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,815 posts

Posted 06 September 2018 - 10:10 AM

You shouldn't install steamcommunity globally. Install it locally in the directory where your project lives.



#3 The Professi0nal

The Professi0nal

    Newbie

  • Member
  • Pip
  • 2 posts

Posted 06 September 2018 - 07:11 PM   Best Answer

You shouldn't install steamcommunity globally. Install it locally in the directory where your project lives.

Thank you, Dr. I knew I was doing something wrong but couldn't figure it out. 







Also tagged with one or more of these keywords: Question, node.js, node-steamcommunity

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users