I am installing Neo4J community server on windows but i am not able to install it

I am getting the below error message

Import-Module : The specified module '\Neo4j-Management.psd1' was not loaded be
cause no valid module file was found in any module directory.
At C:\Users\JOGENDR\Desktop\neo4j-community-3.5.2\bin\neo4j.ps1:27 char:14

  • Import-Module <<<< "$PSScriptRoot\Neo4j-Management.psd1"
    • CategoryInfo : ResourceUnavailable: (\Neo4j-Management.psd1:Str
      ing) [Import-Module], FileNotFoundException
    • FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Comm
      ands.ImportModuleCommand

The term 'Get-Args' is not recognized as the name of a cmdlet, function, script
file, or operable program. Check the spelling of the name, or if a path was in
cluded, verify that the path is correct and try again.
At C:\Users\JOGENDR\Desktop\neo4j-community-3.5.2\bin\neo4j.ps1:28 char:22

  • $Arguments = Get-Args <<<< $args
    • CategoryInfo : ObjectNotFound: (Get-Args:String) , CommandNot
      FoundException
    • FullyQualifiedErrorId : CommandNotFoundException

Hello,

Seems odd, could you answer a few questions for me:

  1. How are you trying to install the server (full command line)? (are you running neo4j.bat for example)
  2. Are you running this as an Administrator?
  3. What version of Windows are you trying to run on?
  4. What version of PowerShell? $PSVersionTable.PSVersion will get you that.
  5. Are the files 'unblocked'? (Right click on the neo4j-community-3.5.2 folder and check if the properties window has an 'unblock' button)
  6. Can you put the output of running: Import-Module C:\Users\JOGENDR\Desktop\neo4j-community-3.5.2\bin\Neo4j-Management.psd1 -verbose in here?

If the result of '6' looks ok, can you then try:

Invoke-Neo4j console

Does that work?

Hi Chris,

i have done all this.

I am using windows 7 OS.

i am getting this error

Import-Module : The specified module '\Neo4j-Management.psd1' was not loaded because no valid module file was found in

any module directory.

At C:\Users\JOGENDR\Desktop\neo4j-community-3.5.2\bin\neo4j.ps1:27 char:14

  • Import-Module <<<< "$PSScriptRoot\Neo4j-Management.psd1"

  • CategoryInfo : ResourceUnavailable: (\Neo4j-Management.psd1:String) [Import-Module], FileNotFoundExcept

ion

  • FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

The term 'Get-Args' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the sp

elling of the name, or if a path was included, verify that the path is correct and try again.

At C:\Users\JOGENDR\Desktop\neo4j-community-3.5.2\bin\neo4j.ps1:28 char:22

  • $Arguments = Get-Args <<<< $args

  • CategoryInfo : ObjectNotFound: (Get-Args:String) , CommandNotFoundException

  • FullyQualifiedErrorId : CommandNotFoundException

The term 'Invoke-Neo4j' is not recognized as the name of a cmdlet, function, script file, or operable program. Check th

e spelling of the name, or if a path was included, verify that the path is correct and try again.

At C:\Users\JOGENDR\Desktop\neo4j-community-3.5.2\bin\neo4j.ps1:29 char:19

  • Exit (Invoke-Neo4j <<<< -Verbose:$Arguments.Verbose -Command $Arguments.ArgsAsStr)

  • CategoryInfo : ObjectNotFound: (Invoke-Neo4j:String) , CommandNotFoundException

  • FullyQualifiedErrorId : CommandNotFoundException

I just had this issue. Not sure which thing fixed it, I upgraded powershell, and also set the JAVA_HOME environment variable, and after a reboot it worked

Hi chis,

After trying with several change and powershell options and editing some conf files , I am finally able to connect to Neo4j Database

Thank God, it is really complicated as it is a powershell base so i installed version 6 ( mentioined more than v2.0 PS version ) in the windows machine.

editing the neo4j.bat file and conf/neo4j.conf fiile inside installation directory ,then it works

I will do some practice now -

Thanks with Regards

Jogendra Patro

I'm glad you've got it sorted - I'm 90% sure it's the powershell version - I think I ran into this on an older windows version - alas - I've not got that VM to hand at the moment to test.

Hi Jogendra Patro,
I am having the same pb. I have updated to PowerShell version 6 but I am struggling with the editing of the neo4j and config files. Could you share what exactly you have changed to make it work?

Regards
BF

Hey @bruno Welcome!

Could you open a command prompt and run:

SET JAVA_HOME

and see what it says - if it says:

Environment variable JAVA_HOME not defined

You could try setting the JAVA_HOME environment variable in Windows settings - to point to the location you have Java installed.

I think (can't be sure) that the changes to the .bat files are probably to do with replacing JAVA_HOME with the actual Java path.

All the best

Chris

Hi,

I am also getting that error. How can i solve?

Hi @sravyakapalavai,

Have you done the steps above? Upgrading Powershell etc?
If so - please can you answer these questions:

  1. How are you trying to install the server (full command line)? (are you running neo4j.bat for example)
  2. Are you running this as an Administrator?
  3. What version of Windows are you trying to run on?
  4. What version of PowerShell? $PSVersionTable.PSVersion will get you that.
  5. Are the files 'unblocked'? (Right click on the neo4j-community-3.5.2 folder and check if the properties window has an 'unblock' button)
  6. Can you put the output of running: Import-Module YOUR PATH\neo4j-community-3.5.2\bin\Neo4j-Management.psd1 -verbose in here?

Obviously, change the paths!

All the best

Chris