如何解决我的问题,Yeoman在运行时仅编写相同的代码

时间:2019-04-14 16:45:47

标签: node.js yeoman

我刚刚安装了Node和Yeoman以使用Visual Studio Code并设置了自己的扩展。但是,当我尝试使用任何命令运行Yeoman时,除了“ --version”之外,我都会想到它会吐出相同的代码,在四处寻找答案后,我真的不知道如何解决。他们在他们的页面上将我重定向到Stackoverflow,以便希望在这里获得一些帮助。

我试图再次安装它,将其卸载然后重新安装。我重新启动计算机,但结果仍然相同。

C:\Users\Marcus>yo
C:\Users\Marcus\AppData\Roaming\npm\node_modules\yo\node_modules\conf\index.js:69
                        throw new TypeError('Use `delete()` to clear values');
                        ^

TypeError: Use `delete()` to clear values
    at Conf.set (C:\Users\Marcus\AppData\Roaming\npm\node_modules\yo\node_modules\conf\index.js:69:10)
    at Insight.set optOut [as optOut] (C:\Users\Marcus\AppData\Roaming\npm\node_modules\yo\node_modules\insight\lib\index.js:56:15)
    at Object.<anonymous> (C:\Users\Marcus\AppData\Roaming\npm\node_modules\yo\lib\cli.js:198:18)
    at Module._compile (internal/modules/cjs/loader.js:816:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
    at Module.load (internal/modules/cjs/loader.js:685:32)
    at Function.Module._load (internal/modules/cjs/loader.js:620:12)
    at Function.Module.runMain (internal/modules/cjs/loader.js:877:12)
    at internal/main/run_main_module.js:21:11
C:\Users\Marcus>yo --version
2.0.5

安装日志:

C:\Users\Marcus>npm install -g yo
npm WARN deprecated cross-spawn-async@2.2.5: cross-spawn no longer requires a build toolchain, use it instead
C:\Users\Marcus\AppData\Roaming\npm\yo-complete -> C:\Users\Marcus\AppData\Roaming\npm\node_modules\yo\lib\completion\index.js
C:\Users\Marcus\AppData\Roaming\npm\yo -> C:\Users\Marcus\AppData\Roaming\npm\node_modules\yo\lib\cli.js

> yo@2.0.5 postinstall C:\Users\Marcus\AppData\Roaming\npm\node_modules\yo
> yodoctor


Yeoman Doctor
Running sanity checks on your system

√ Global configuration file is valid
√ NODE_PATH matches the npm root
√ Node.js version
√ No .bowerrc file in home directory
√ No .yo-rc.json file in home directory
√ npm version
√ yo version

Everything looks all right!
+ yo@2.0.5
updated 1 package in 13.648s

我已按照herehere提供的说明进行操作。

0 个答案:

没有答案