Menu icon Foundation
Work Flow for Team Environment

Hey all,

I have been working with Foundation for Emails (1 and 2) for several months.  I've added my projects to TFS (Team Foundation Server) to handle source control. 

I have three projects setup.  (One for each Brand)

Inside the respected Brand folder I have Foundation for Emails project created. As a test, I removed the npm node modules folder and the dist folder (as I want to exclude those from souce control) otherwise my team and I would be running into conflicts all the time.  I added the folders successfully to TFS and then opened the Command Line to go to the folder where one of my projects lives.

I ran the npm install command (to get all the node modules I removed) and it looked into the package.json file and downloaded all the dependencies that made it work.  However, it error out when I tried to inline.  I got the following message: 

Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Windows\system32>cd ..

C:\Windows>cd ..

C:\>cd source/main
C:\source\main>cd src
C:\source\main\src>cd emails
C:\source\main\src\emails>cd tacticalgear
C:\source\main\src\emails\tacticalgear>foundation build
> [email protected] build C:\source\main\src\emails\tacticalgear
> gulp --production

[10:13:33] Failed to load external module babel-register
[10:13:33] Requiring external module babel-core/register
[10:13:36] Using gulpfile C:\source\main\src\emails\tacticalgear\gulpfile.babel.js
[10:13:36] Starting 'default'...
[10:13:36] Starting 'build'...
[10:13:36] Starting 'clean'...
[10:13:36] Finished 'clean' after 8.39 ms
[10:13:36] Starting 'pages'...
[10:13:39] Finished 'pages' after 2.51 s
[10:13:39] Starting 'sass'...
[10:13:39] Finished 'sass' after 134 ms
[10:13:39] Starting 'images'...
[10:13:39] gulp-imagemin: Minified 0 images
[10:13:39] Finished 'images' after 311 ms
[10:13:39] Starting 'inline'...
[10:13:41] 'inline' errored after 1.33 s
[10:13:41] Error: EPERM: operation not permitted, open 'C:\source\main\src\emails\tacticalgear\dist\review\index.html'
    at Error (native)
[10:13:41] 'build' errored after 4.3 s
[10:13:41] 'default' errored after 4.3 s
Error: [email protected] build: `gulp --production`
Exit status 1
    at EventEmitter.<anonymous> (C:\Users\corey\AppData\Roaming\npm\node_modules\foundation-cli\node_modules\npm\lib\utils\lifecycle.js:217:16)
    at emitTwo (events.js:87:13)
    at EventEmitter.emit (events.js:172:7)
    at ChildProcess.<anonymous> (C:\Users\corey\AppData\Roaming\npm\node_modules\foundation-cli\node_modules\npm\lib\utils\spawn.js:24:14)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:827:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

C:\source\main\src\emails\tacticalgear>

Based on the error, it seems to be a permission issue. The problem is that the dist folder is inheritting permissions from the folder that it sits inside of (because it's part of TFS).  Even though I have the dist folder excluded from TFS, the folder that gets added / deleted is inheriting permissions from the folder that it sits inside of.  So I'm at a loss as to how to combat that problem? 

Any ideas? 

 

foundation for emailsFFE2permissionsworkflow

Hey all,

I have been working with Foundation for Emails (1 and 2) for several months.  I've added my projects to TFS (Team Foundation Server) to handle source control. 

I have three projects setup.  (One for each Brand)

Inside the respected Brand folder I have Foundation for Emails project created. As a test, I removed the npm node modules folder and the dist folder (as I want to exclude those from souce control) otherwise my team and I would be running into conflicts all the time.  I added the folders successfully to TFS and then opened the Command Line to go to the folder where one of my projects lives.

I ran the npm install command (to get all the node modules I removed) and it looked into the package.json file and downloaded all the dependencies that made it work.  However, it error out when I tried to inline.  I got the following message: 

Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Windows\system32>cd ..

C:\Windows>cd ..

C:\>cd source/main
C:\source\main>cd src
C:\source\main\src>cd emails
C:\source\main\src\emails>cd tacticalgear
C:\source\main\src\emails\tacticalgear>foundation build
> [email protected] build C:\source\main\src\emails\tacticalgear
> gulp --production

[10:13:33] Failed to load external module babel-register
[10:13:33] Requiring external module babel-core/register
[10:13:36] Using gulpfile C:\source\main\src\emails\tacticalgear\gulpfile.babel.js
[10:13:36] Starting 'default'...
[10:13:36] Starting 'build'...
[10:13:36] Starting 'clean'...
[10:13:36] Finished 'clean' after 8.39 ms
[10:13:36] Starting 'pages'...
[10:13:39] Finished 'pages' after 2.51 s
[10:13:39] Starting 'sass'...
[10:13:39] Finished 'sass' after 134 ms
[10:13:39] Starting 'images'...
[10:13:39] gulp-imagemin: Minified 0 images
[10:13:39] Finished 'images' after 311 ms
[10:13:39] Starting 'inline'...
[10:13:41] 'inline' errored after 1.33 s
[10:13:41] Error: EPERM: operation not permitted, open 'C:\source\main\src\emails\tacticalgear\dist\review\index.html'
    at Error (native)
[10:13:41] 'build' errored after 4.3 s
[10:13:41] 'default' errored after 4.3 s
Error: [email protected] build: `gulp --production`
Exit status 1
    at EventEmitter.<anonymous> (C:\Users\corey\AppData\Roaming\npm\node_modules\foundation-cli\node_modules\npm\lib\utils\lifecycle.js:217:16)
    at emitTwo (events.js:87:13)
    at EventEmitter.emit (events.js:172:7)
    at ChildProcess.<anonymous> (C:\Users\corey\AppData\Roaming\npm\node_modules\foundation-cli\node_modules\npm\lib\utils\spawn.js:24:14)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:827:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

C:\source\main\src\emails\tacticalgear>

Based on the error, it seems to be a permission issue. The problem is that the dist folder is inheritting permissions from the folder that it sits inside of (because it's part of TFS).  Even though I have the dist folder excluded from TFS, the folder that gets added / deleted is inheriting permissions from the folder that it sits inside of.  So I'm at a loss as to how to combat that problem? 

Any ideas? 

 

Rafi Benkual over 3 years ago

I'm not familiar with that either. Though I wonder what issues you were trying to solve by moving out the node_modules folder. Is it versioning?

Corey Schaaf over 3 years ago

Updated: One of the developers on my team used gulp-chmod to adjust the permission of the file. Here is a link to the documentation about the packge: https://www.npmjs.com/package/gulp-chmod

You can install it by running the following command in your project folder: 

npm install gulp-chmod -D

notice the -D adds it to the dependencies in your package.json file. As a result, if you open your package.json file, you'll see the following has been added:

import chmod    from 'gulp-chmod';

In the gulpfile.babel.js you must add the second line.

.pipe(inky())
   .pipe(chmod(755))    //added this to fix file permission issues
   .pipe(gulp.dest('dist'));

Next, run the following command:

npm install

and then:

foundation build

Hope this helps anyone else using TFS for multiple designers working on the same projects. Or the lone wolf who doesn't want to accidentally delete all of their projects. :) 

ALSO: If you update foundation for emails to 2.1.0 (or any version for that matter), you may have to edit your gulpfile.babel.js to include the edits above after you've updated. 

 

Corey Schaaf over 3 years ago

Rafi, 

The only reason I removed the node modules folder was to test when other team members download the same project as me. I wanted to make sure when they got latest version all the node modules I was using based on the package.json file. That test did work.  I was just trying to provide as much information as possible for anyone else who was running into the problem.