Creating meteor project throws error

2019-08-27 11:26发布

问题:

The question which was said has the same solution has no solution, so it does not solve my problem.

I've installed Node, writing node -v in cmd returns v8.10.0.

Also installed meteor, meteor --version returns Meteor 1.6.1. After these steps I want to create an app like here.

So, I wrote:

meteor create simple-todos

and I get this error:

C:\Users\Rares\AppData\Local.meteor\packages\meteor-tool\1.6.1\mt-os.windows.x86_64\dev_bundle\lib\node_modules\meteor-promise\promise_server.js:218 throw error; ^

Error: Error: Could not install npm dependencies for test-packages: Command failed: C:\WINDOWS\system32\cmd.exe /c C:\Users\Rares\AppData\Local.meteor\packages\meteor-tool\1.6.1\mt-os.windows.x86_64\dev_bundle\bin\npm.cmd install --production=false npm ERR! Cannot read property 'match' of undefined

npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\Rares\AppData\Roaming\npm-cache_logs\2018-03-27T20_09_26_892Z-debug.log npm ERR! Cannot read property 'match' of undefined

npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\Rares\AppData\Roaming\npm-cache_logs\2018-03-27T20_09_26_892Z-debug.log

at Object.error (C:\tools\utils\buildmessage.js:430:11)
at C:\tools\cli\default-npm-deps.js:36:20
at C:\tools\utils\buildmessage.js:334:18
at exports.EnvironmentVariable.withValue (C:\tools\utils\fiber-helpers.js:89:14)
at C:\tools\utils\buildmessage.js:333:36
at exports.EnvironmentVariable.withValue (C:\tools\utils\fiber-helpers.js:89:14)
at Object.enterJob (C:\tools\utils\buildmessage.js:324:26)
at Object.install (C:\tools\cli\default-npm-deps.js:27:27)
at Command.func (C:\tools\cli\commands.js:801:36)
at C:\tools\cli\main.js:1523:15

The function from promise_server.js invoked is

function tryCatchNextTick(object, method, args) {
  try {
    return method.apply(object, args);
  } catch (error) {
    process.nextTick(function () {
      throw error;
    });
  }
}

Any idea how to solve this?

回答1:

The solution in my case was to run these steps:

meteor npm install 
meteor