gheeres / node-activedirectory

ActiveDirectory is an Node.js ldapjs client for authN (authentication) and authZ (authorization) for Microsoft Active Directory with range retrieval support for large Active Directory installations.
MIT License
534 stars 146 forks source link

Run activedirectory #236

Open geom16011 opened 2 years ago

geom16011 commented 2 years ago

Hallo

I have used the npm install activedirectory i create a json as specified bellow { "name": "ldap", "version": "1.0.0", "main": "ldap.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { "activedirectory": "^0.7.2", "async": "^3.2.2", "bunyan": "^1.8.15", "ldapjs": "^2.3.1", "underscore": "^1.13.1" }, "devDependencies": {}, "description": "" }

Create a javascript file and use an import statement as follows

import ActiveDirectory from "package.json";

However import does not work.

Any ideas?

emmalouiselane commented 2 years ago

You have to import from the npm package rather than the package.json, try this:

import ActiveDirectory from 'activedirectory';