首页 > 解决方案 > 安装 ['create-svelte@next'] 失败,代码为 1

问题描述

我是一个苗条的新手,并试图了解它,但我无法从一开始就建立这个项目。

当我键入npm init svelte@next my-app启动它时,它会在终端中引发错误,

C:\Users\Ermais Kidane\Documents\REACT>npm init svelte@next my-sveltekit-pokedex               
npm WARN npm npm does not support Node.js v14.15.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11, 12, 13.
npm WARN npm You can find the latest version at https://nodejs.org/
npm ERR! code ENOLOCAL : info using node@v14.15.0
npm ERR! Could not install from "Kidane\AppData\Roaming\npm-cache\_npx\25760" as it does not contain a package.json file.
[..................] \ : info using node@v14.15.0
npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Ermais Kidane\AppData\Roaming\npm-cache\_logs\2021-06-30T12_26_34_849Z-debug.log
Install for [ 'create-svelte@next' ] failed with code 1

我更新了我的 nodeJs v16,但没有任何改变你能帮我解决这个问题吗?

标签: node.jssveltesvelte-componentsveltekit

解决方案


您需要独立更新 npm:

npm install -g npm@next

推荐阅读