哟@microsoft/sharepoint 将重新运行此错误“TypeError:lookups.flatMap 不是函数”

问题描述

我有 node.js 版本

C:\helloworld-webpart>node -v
v10.24.1

当我使用 cmd windows 运行此命令时,出现此错误:-

C:\helloworld-webpart>yo @microsoft/sharepoint
C:\Users\mohan\AppData\Roaming\npm\node_modules\yo\node_modules\yeoman-environment\lib\resolver.js:70
    filePatterns: lookups.flatMap(prefix => [`${prefix}/*/index.ts`,`${prefix}/*/index.js`,`${prefix}/*/index.cjs`,`${prefix}/*/index.mjs`]),^

TypeError: lookups.flatMap is not a function
    at Environment.resolver.lookup (C:\Users\mohan\AppData\Roaming\npm\node_modules\yo\node_modules\yeoman-environment\lib\resolver.js:70:27)
    at init (C:\Users\mohan\AppData\Roaming\npm\node_modules\yo\lib\cli.js:130:7)
    at pre (C:\Users\mohan\AppData\Roaming\npm\node_modules\yo\lib\cli.js:89:3)
    at Object.<anonymous> (C:\Users\mohan\AppData\Roaming\npm\node_modules\yo\lib\cli.js:219:3)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)

有什么建议吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...