(Resolved) Meteor create => Error: Cannot find module 'config-chain'

Just installed successfully Meteor at Windows 10

meteor create testapp gave the following error message

Any suggestions?

PS C:\meteor-react> meteor create --react testapp
module.js:549
    throw err;
    ^

Error: Cannot find module 'config-chain'
    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\rp\node_modules\npm\lib\config\core.js:1:10)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at Module.Mp.load (C:\tools\tool-env\install-runtime.js:20:29)
    at tryModuleLoad (module.js:505:12)
PS C:\meteor-react>

Hi,

I just gave it another try.
As follows:
I uninstalled meteor
I restarted my computer
I installed meteor with choco
The install was succesfully
However, meteor create ~/my_cool_app gave (again) the error: Cannot find module ‘config-chain’

Any suggestions to resolve this issue?

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\WINDOWS\system32> choco install meteor
Chocolatey v0.10.11
Installing the following packages:
meteor
By installing you accept licenses for the packages.
Progress: Downloading meteor 0.0.2... 100%

meteor v0.0.2 [Approved]
meteor package files install completed. Performing other installation steps.
The package meteor wants to run 'chocolateyinstall.ps1'.
Note: If you don't run this script, the installation will fail.
Note: To confirm automatically next time, use '-y' or consider:
choco feature enable -n allowGlobalConfirmation
Do you want to run the script?([Y]es/[N]o/[P]rint): Y

Downloading meteor 64 bit
  from 'https://packages.meteor.com/bootstrap-link?arch=os.windows.x86_64'
Progress: 100% - Completed download of C:\Users\rp\AppData\Local\Temp\chocolatey\meteor\0.0.2\meteor-bootstrap-os.windows.x86_64.tar.gz (159.5 MB).
Download of meteor-bootstrap-os.windows.x86_64.tar.gz (159.5 MB) completed.
Extracting C:\Users\rp\AppData\Local\Temp\chocolatey\meteor\0.0.2\meteor-bootstrap-os.windows.x86_64.tar.gz to C:\Users\rp\AppData\Local\Temp\chocolatey\meteor\0.0.2...
C:\Users\rp\AppData\Local\Temp\chocolatey\meteor\0.0.2
Extracting C:\Users\rp\AppData\Local\Temp\chocolatey\meteor\0.0.2\meteor-bootstrap-os.windows.x86_64.tar to C:\Users\rp\AppData\Local...
C:\Users\rp\AppData\Local
***************************************

Meteor has been installed!

To get started fast:

  $ meteor create ~/my_cool_app
  $ cd ~/my_cool_app
  $ meteor

Or see the docs at:

  https://docs.meteor.com

***************************************
 The install of meteor was successful.
  Software installed to 'C:\Users\rp\AppData\Local'

Chocolatey installed 1/1 packages.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
PS C:\WINDOWS\system32>  meteor create ~/my_cool_app
module.js:549
    throw err;
    ^

Error: Cannot find module 'config-chain'
    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\rp\node_modules\npm\lib\config\core.js:1:10)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at Module.Mp.load (C:\tools\tool-env\install-runtime.js:20:29)
    at tryModuleLoad (module.js:505:12)
PS C:\WINDOWS\system32>

You should install Meteor with admin rights, yes.

But try to start Meteor without admin rights. I.e. after installation, close PowerShell and open another instance of PowerShell without elevated rights.

Hi,
Thanks for the suggestion.
I tried it and got the same error message.

Well, what is the exact error message you’re getting this time?

I checked the error message line-by-line and it is exact the same error message.

Yes - as @rhywden says, you must run Meteor post-installation with normal user privileges.

That has weird behaviour on Windows, even using PowerShell, which is quite tolerant of / \ differences. Try meteor create my_cool_app.

Again the same exact result.

I alo tried in in conemu and again the same exact result.

Have you installed node and npm separately from Meteor at any time?

Yes, I have tried all kind of actions.

There were issues with config-chain in old versions of node and npm (although to be fair I can’t recall any Meteor specific ones).

I’m wondering if there’s some conflict here. Have you tried uninstalling any old versions of node and npm, together with any globally installed packages?

Meteor comes bundled with the correct versions of node and npm, so separate installs are unnecessary (unless you’re using them for something else).

Okay, I will give it a try and report back

As follows:
I have removed node.js through control panel
Removed meteor through chocolatey
Installed meteor with chocolatey
Closed elevated PS
Restarted the computer
Opened normal PS
Same error.
Also meteor --version gives the same error.

Could you please still post an error log of the errors you get when you do not try it with elevated rights?

Because it won’t be the same error.

I can’t duplicate your issue on my machine. In an administrator PS window:

  • I uninstalled meteor with choco uninstall meteor
  • Installed meteor with choco install meteor:
    PS C:\Users\robfallows> choco install meteor
    Chocolatey v0.10.11
    Installing the following packages:
    meteor
    By installing you accept licenses for the packages.
    Progress: Downloading meteor 0.0.2... 100%
    
    meteor v0.0.2 [Approved]
    meteor package files install completed. Performing other installation steps.
    The package meteor wants to run 'chocolateyinstall.ps1'.
    Note: If you don't run this script, the installation will fail.
    Note: To confirm automatically next time, use '-y' or consider:
    choco feature enable -n allowGlobalConfirmation
    Do you want to run the script?([Y]es/[N]o/[P]rint): Y
    
    Downloading meteor 64 bit
      from 'https://packages.meteor.com/bootstrap-link?arch=os.windows.x86_64'
    Progress: 100% - Completed download of C:\Users\robfallows\AppData\Local\Temp\chocolatey\meteor\0.0.2\meteor-bootstrap-os.windows.x86_64.tar.gz (159.5 MB).
    Download of meteor-bootstrap-os.windows.x86_64.tar.gz (159.5 MB) completed.
    Extracting C:\Users\robfallows\AppData\Local\Temp\chocolatey\meteor\0.0.2\meteor-bootstrap-os.windows.x86_64.tar.gz to C:\Users\robfallows\AppDa\Local\Temp\chocolatey\meteor\0.0.2...
    C:\Users\robfallows\AppData\Local\Temp\chocolatey\meteor\0.0.2
    Extracting C:\Users\robfallows\AppData\Local\Temp\chocolatey\meteor\0.0.2\meteor-bootstrap-os.windows.x86_64.tar to C:\Users\robfallows\AppData\Local...
    C:\Users\robfallows\AppData\Local
    ***************************************
    
    Meteor has been installed!
    
    To get started fast:
    
      $ meteor create ~/my_cool_app
      $ cd ~/my_cool_app
      $ meteor
    
    Or see the docs at:
    
      https://docs.meteor.com
    
    ***************************************
     The install of meteor was successful.
      Software installed to 'C:\Users\robfallows\AppData\Local'
    
    Chocolatey installed 1/1 packages.
     See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
    

Then in a non-administrator PS window:

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\Users\robfallows> meteor create my-awesome-app
Created a new Meteor app in 'my-awesome-app'.

To run your new app:
  cd my-awesome-app
  meteor

If you are new to Meteor, try some of the learning resources here:
  https://www.meteor.com/tutorials

To start with a different app template, try one of the following:

  meteor create --bare    # to create an empty app
  meteor create --minimal # to create an app with as few Meteor packages as possible
  meteor create --full    # to create a more complete scaffolded app
  meteor create --react   # to create a basic React-based app

PS C:\Users\robfallows> meteor --version
Meteor 1.8.0.2

@rhywden

Here the message I get with meteor --version on a ‘normal’ PS with no node.js installed.

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\Users\rp> node --version
node : The term 'node' 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 included, verify that the path is correct and try again.
At line:1 char:1
+ node --version
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (node:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Users\rp> meteor --version
module.js:549
    throw err;
    ^

Error: Cannot find module 'config-chain'
    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\rp\node_modules\npm\lib\config\core.js:1:10)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at Module.Mp.load (C:\tools\tool-env\install-runtime.js:20:29)
    at tryModuleLoad (module.js:505:12)
PS C:\Users\rp>

Okay, your directories are seriously weird.

What do you get if you execute this in a Powershell instance?

$env:Path.split(';')

Good news!

Based on this stackoverflow discussion I have deleted several files and cleaned up directories like AppData.
After that I did again meteor --version and meteor responded with Extracting meteor-too@1.5.2-1 ...
And gave as answer Meteor 1.5.2.1
Why version 1.5.2.1.? I don’t know

I tried meteor upgrade and got the following response


rp@DESKTOP-OVRT90Q C:\meteor-react\meteor-react-start-app
> meteor update
C:\Users\rp\AppData\Local\.meteor\packages\meteor-tool\1.5.2_1\mt-os.windows.x86_32\dev_bundle\lib\node_modules\meteor-promise\promise_server.js:218
      throw error;
      ^

Error: missing tool for os.windows.x86_32 in meteor-tool@1.8.0_2
    at Error (native)
    at springboard (C:\tools\cli\main.js:491:11)
    at C:\tools\cli\main.js:1501:7

rp@DESKTOP-OVRT90Q C:\meteor-react\meteor-react-start-app

I will now uninstall and install meteor again and report later.

Again, your paths are skewed. C:\tools\ is not a standard folder for any program I know. No wonder it yields a file not found.

You also shouldn’t plonk your own folders into the root folder like that.

@rhywden @robfallows Thanks for supporting me with this issue.

Meteor is up and running.

1 Like