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>
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>
But try to start Meteor without admin rights. I.e. after installation, close PowerShell and open another instance of PowerShell without elevated rights.
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).
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.
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
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>
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.