因此,我在 Visual Studio Code - Insiders 的终端中输入 npm init
,结果如下:
npm init
npm : The term 'npm' 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
+ npm init
+ ~~~
+ CategoryInfo : ObjectNotFound: (npm:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
我的 PC 上确实有最新版本的 node.js 和 VSC Insiders。任何帮助将不胜感激:)
答案 0 :(得分:0)
这是因为系统无法进行节点打包。 您应该尝试在您的系统环境变量中设置下载的节点包的路径。
ilist[ic] = iw;
到系统属性上环境变量的“用户变量”部分的路径变量的末尾。
答案 1 :(得分:0)
尝试以下解决方案:
import { cache } from '@emotion/css';
import { CacheProvider } from '@emotion/react';
export const wrapRootElement = ({ element }) => {
return <CacheProvider value={cache}>{element}</CacheProvider>;
};
添加到您的 PATH 环境变量(替换为您的用户名)。要访问环境变量,请执行以下操作: