Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter5: grunt issues (on Windows 7) #78

Open
vkelman opened this issue May 25, 2016 · 6 comments
Open

Chapter5: grunt issues (on Windows 7) #78

vkelman opened this issue May 25, 2016 · 6 comments

Comments

@vkelman
Copy link

vkelman commented May 25, 2016

For inexperienced user like me problems with setting up tests are much more significant than with running actual code. I understand it's not under book author's control: open source apps are constantly experiencing breaking changes. But it leads to frustration and just ignoring tests altogether.

For me trying to run any of these

npm install --save-dev grunt-cafe-mocha
npm install --save-dev grunt-contrib-jshint
npm install --save-dev grunt-exec

Leads to following errors:

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "--save-dev" "grunt-exec"
npm ERR! node v4.4.4
npm ERR! npm v2.15.1
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package grunt@1.0.1 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer grunt-exec@0.4.7 wants grunt@>=0.4
npm ERR! peerinvalid Peer grunt-cafe-mocha@0.1.13 wants grunt@~0.4.1
npm ERR! peerinvalid Peer grunt-contrib-jshint@1.0.0 wants grunt@>=0.4.0

npm ERR! Please include the following file with any support request:
npm ERR! C:\Developer\WebstormProjects\NodeJs\MeadowlarkTravel\npm-debug.log

@mikeycarreiro
Copy link

Just ran into the same issue. I was able to workaround this issue by installing version 0.4.1 of grunt, which looked to be the closest version requirement of all the dependencies thrown out in the error messages.

npm install --save-dev grunt

That said, if anyone else is familiar, are there new or better dependencies that work with "grunt": "^1.0.1"? Some initial google searches show it's quite a common issue, so maybe just some more reading will shine some light on the issue.

@vkelman
Copy link
Author

vkelman commented Jun 17, 2016

By the way, am I right that these issues have nothing to do with OS I'm working on? Those are NodeJs modules, the same for Windows, Linux, etc, correct?

@EthanRBrown
Copy link
Owner

EthanRBrown commented Jun 17, 2016

Sorry I haven't been able to respond routinely to this thread...work is busy, and my partner and I have a baby on the way...due on Saturday!

@vkelman , it is frustrating, I understand, and I'm sorry. Heck, it's frustrating for those of us who are experienced users.

I haven't run across this problem with grunt, but doing a little research, the problem looks like it might be related to global modules. Grunt is normally installed both globally (for the command-line runner) and locally (for gruntfile.js library support). First, try doing npm update -g to update all of your global modules. Also, whenever running into mysterious npm issues, it's wise (if annoying) to simply blow away your node_modules directory and then do npm install to start with a fresh set of dependencies.

Re: OS issues: I'm afraid to say that they may have to do with OS. Ostensibly, Node is a cross-platform environment, but that doesn't stop module creators from writing things that don't behave well cross-platform. I've actually been fairly disappointed in the lack of commitment in the community to cross-platform support. For example, I will be removing coverage of cross-browser testing with Zombie from the next edition of this book because of extremely poor cross-platform support for Zombie.

Sorry again that you're having issues, and I'm sorry I don't have the bandwidth to really dive in right now. I will be releasing a major update (new edition, most likely) in 2017.

@vkelman
Copy link
Author

vkelman commented Jun 21, 2016

Ethan,

Thank you for support. I totally understand and don't expect immediate solutions.

@Pinnock
Copy link

Pinnock commented Sep 18, 2016

All,
I was able to resolve all the errors listed in the original post by using grunt 0.4.1 (instead of 1.0.1). I then installed grunt 0.4.5 and the errors were still resolved. Instructions on how to install specific versions of grunt can be found here: http://gruntjs.com/installing-grunt

Ethan,
I am looking forward to the new edition of your book. If I may make a suggestion, since these tools change so rapidly, by the time your new book comes out the tools will no doubt have changed again. Therefore, to lessen the frustration of your readers, it might be better to use specific version numbers in all the installation steps provided in the book. That way your readers should be able to follow along without running into issues introduced by some breaking change that was made in the current version of one or more of the tools.

@vkelman
Copy link
Author

vkelman commented Sep 19, 2016

@Pinnock - good idea about using specific version numbers in package.json. I'm readying Angular 2 Development with TypeScript book in parallel, and there are similar issues with all the packages evolving fast. Specifying exact package versions which were tested to run on Linux and Windows, then, after a while, upgrading them, and testing again is the way to go. We readers can also help in this process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants