简体   繁体   English

Github提交仅在运行NPM后失败

[英]Github commit fails only after NPM install is run

/Github Beginner. / Github初学者。 I'm trying to get to grips with Github, I understand most of the basics (I think). 我试图与Github接触,我了解大多数基本知识(我认为)。 However I'm totally stumped by an error message I'm receiving when I try to commit some changes. 但是,当我尝试进行一些更改时,我收到的错误消息让我感到非常困惑。

As context, I forked and then cloned the flux/alt repo https://github.com/goatslacker/alt . 作为上下文,我分叉,然后克隆了flux / alt回购https://github.com/goatslacker/alt I then copied one of the example projects but made some changes to use webpack rather than browserify. 然后,我复制了一个示例项目,但进行了一些更改以使用webpack而不是browserify。 Committing/synching these changes worked fine. 提交/同步这些更改效果很好。 But now when I make local changes I get the error message 'env: node: No such file or directory (1)' 但是现在当我进行本地更改时,我收到错误消息“ env:node:No such file or directory(1)”

I explored it a bit further, and it seems this error message only appears after I have NPM installed the package.json, ie if I take a fresh clone of the repo, I can make changes and commit fine - as long as I do not NPM install. 我进一步研究了它,似乎只有在我安装了NPM的package.json之后,才会出现此错误消息,即,如果我重新获得该仓库的副本,则可以进行更改并进行正确操作-只要我不这样做即可NPM安装。

这个问题是由根package.json的NPM安装引起的,因此要解决该问题,我将所有必要的内容都移到了项目目录package.json中,只有NPM安装了此目录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM