0

I messed up my local project with Foundation 6 but I had everything on a remote web server so I downloaded my project to a local folder. When I tried to run foundation watch I got errors

sh: /myfolder/node_modules/.bin/gulp: Permission denied
Error: foundation-sites-template@1.0.0 start: `gulp`
Exit status 126
    at EventEmitter.<anonymous> (/usr/local/lib/node_modules/foundation-cli/node_modules/npm/lib/utils/lifecycle.js:217:16)
    at emitTwo (events.js:100:13)
    at EventEmitter.emit (events.js:185:7)
    at ChildProcess.<anonymous> (/usr/local/lib/node_modules/foundation-cli/node_modules/npm/lib/utils/spawn.js:24:14)
    at emitTwo (events.js:100:13)
    at ChildProcess.emit (events.js:185:7)
    at maybeClose (internal/child_process.js:850:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)

Is that fixable?

Kira
  • 1,575
  • 4
  • 26
  • 48

1 Answers1

3

Whatever means of copying you used probably messed up the executable bit of /myfolder/node_modules/.bin/gulp. Type the following in a terminal:

chmod a+x /myfolder/node_modules/.bin/gulp

There might be other files with permission issues, so it's probably best to just delete the the whole node_modules folder and npm install from scratch.

Sven Schoenung
  • 30,224
  • 8
  • 65
  • 70
  • I saw this answer after I deleted everything and started from scratch :( – Kira Mar 30 '16 at 18:58
  • Just to let you know - this works. I had to delete node modules and run npm install. After that foundation watch continued to do it's job. Thanks – Kira Apr 01 '16 at 13:39