Node.js 我能';t使用npm运行部署部署react应用程序
我需要建议调试React站点从Github到Netlify的部署 我使用下面的代码进行部署:npm run deploy 这是终端上的错误:Node.js 我能';t使用npm运行部署部署react应用程序,node.js,reactjs,npm,deployment,Node.js,Reactjs,Npm,Deployment,我需要建议调试React站点从Github到Netlify的部署 我使用下面的代码进行部署:npm run deploy 这是终端上的错误: npm ERR! code ELIFECYCLE npm ERR! file sh npm ERR! errno ENOENT npm ERR! v1.0.0@0.1.0 deploy: `inhyechoi -d build` npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the v1.0.0@0.
npm ERR! code ELIFECYCLE
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! v1.0.0@0.1.0 deploy: `inhyechoi -d build`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the v1.0.0@0.1.0 deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
到目前为止,我所尝试的:
-卸载npm
-使用最新更新重新安装npm
-删除节点模块
-安装节点模块
-npm缓存清除
-npm ci
这是github回购协议:
完整日志:
v1.0.0@0.1.0 deploy /Users/inhyechoi/Desktop/InhyeChoi/react/portfolio/inhyechoi-portfolio-react
inhyechoi -d build
sh: inhyechoi: command not found
npm ERR! code ELIFECYCLE
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! v1.0.0@0.1.0 deploy: `inhyechoi -d build`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the v1.0.0@0.1.0 deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
package.json中的
deploy
命令是“deploy”:“inhyechoi-d build-b master”
错误是说,inhyechoi中的不是命令,这是正确的,它只是项目的名称,而不是可以在终端中调用的程序
要生成react应用程序,请运行npm run build
或npm run script build
。
要使用netlify部署,我相信您只需运行netlify
deploy”,因此请尝试更改您的包。json的deploy
命令为“deploy”:“netlify deploy”
如果要构建和部署,可能必须将其更改为“deploy”:“npm运行构建;netlify部署“