Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

SASS/node error working with "old" FP 1.x projects alongside FP 2.x #722

Closed
hawbsl opened this issue Feb 10, 2016 · 4 comments
Closed

SASS/node error working with "old" FP 1.x projects alongside FP 2.x #722

hawbsl opened this issue Feb 10, 2016 · 4 comments

Comments

@hawbsl
Copy link

hawbsl commented Feb 10, 2016

I'm getting to grips with the "new" FoundationPress 2.x way of doing things. Thanks for everyone who helped with #704.

But I also need to make tiny changes to the SASS in old FP1.x projects. I don't want to update them to the latest Foundation or FoundationPress.

I understand that old and new use different versions of node.js.

With FP2.x ... I am using node 4.2.6
With FP1.x ... I am using node 0.10.33

I have a switcher thing installed in node which switches between them.

However if I try to grunt watch with FP1.x and node 0.10.33 I am getting an error. grunt watch used to work find on all my many FP1.x and node 0.10.33 projects.

The error is

image

@colin-marshall
Copy link
Collaborator

When you're on node 0.10 see if this works:

  • npm install -g grunt-cli
  • rm -rf node_modules
  • npm cache clean
  • npm install

@hawbsl
Copy link
Author

hawbsl commented Feb 17, 2016

@colin-marshall thanks for answering and sorry for the delay replying.

I've tried your instructions.

rm -rf node_modules didn't execute, unrecognised command, perhaps because I'm on Windows?

Nevertheless, that got rid of the sass.js ERROR and only left the grunt-open not found warning, which I don't think matters, and may have always been there. I can't remember.

The main thing is that SASS is now compiling nicely. Thanks for the assistance.

Can I ask then:

  1. Do I have to do this every time I switch between the two kinds of project/the two versions of node? Or was it a one off?
  2. Will my newer FP2.x have been affected (I haven't gone back to them yet and tried)?

@colin-marshall
Copy link
Collaborator

rm -rf node_modules deletes the node_modules directory and all of its subdirectories. So replace that command with whatever windows command would do that, but if it's working it doesn't matter anymore.

I don't know what you are using to switch versions of node. I use nvm, and it's my understanding that each version of node you have installed will have its own set of global modules installed. So you would need to do the npm install -g grunt-cli only once per version of node that you want to use grunt with.

To answer your questions, this should be a one off deal, and you should not need to do that every time you switch versions, and it should not effect your 2.x installs (assuming that the way you are switching node versions is handled similar to the way nvm does it). The worst that can happen is you end up having to reinstall some npm modules, so go ahead and test the switching between node versions for 1.x and 2.x projects and see if it works properly now.

@hawbsl
Copy link
Author

hawbsl commented Feb 17, 2016

Thanks @colin-marshall for the detailed answer.

My switcher is this one.

So hopefully you're correct and I'll be able to work smoothly in the two separate universes of FP1/Foundation5/Grunt and FP2/Foundation6/Gulp without one interfering with the other.

I'll close this and thanks again.

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

No branches or pull requests

2 participants