foundation / foundation-cli

The command line installer for Foundation Sites, Emails, Apps.
178 stars 47 forks source link

Package.json generated with unavailable Gulp build from deleted branch #109

Open superbuggy opened 5 years ago

superbuggy commented 5 years ago

I am trying to create a new foundation email project but receive the errors detailed below. How have others been resolving this issue?

I've followed the recommended steps here, specifically npm i gulp@next, but have had issues with CSS not being properly inlined after running foundation build. There is css that doesn't get inlined, and the final built files have a <link> tag referring to app.css.

 $ foundation new --framework emails
? What's the project called? (no spaces) test-project

          _____
         /     \
        /=   . |
    ___| ==  | /    Thanks for using ZURB Foundation for Emails!
   /   | ===  \     -------------------------------------------
   |   | ====  |    Let's set up a new project.
   /__/| =====  \   It shouldn't take more than a minute.
       (   __   )
        (O)  (O)
       (   __,  )
        \______/

Downloading the project template...
Done downloading!

Installing dependencies...

npm ERR! git rev-list -n1 4.0: fatal: ambiguous argument '4.0': unknown revision or path not in the working tree.
npm ERR! git rev-list -n1 4.0: Use '--' to separate paths from revisions, like this:
npm ERR! git rev-list -n1 4.0: 'git <command> [<revision>...] -- [<file>...]'
npm ERR! git rev-list -n1 4.0:

There were some problems during the installation.

 ✓ New project folder created.
 ✗ Node modules not installed. Try running npm install manually.
 ✓ Bower components installed.

Once you've resolved the above issues, run foundation watch while inside the test-project folder.
 $ cd test-project
 $ npm i

Produces the following error...

npm WARN deprecated babel-preset-es2015@6.24.1: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
npm WARN deprecated gulp-uncss@1.0.6: Use UnCSS through gulp-postcss instead.
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated gulp-util@2.2.20: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated nodemailer@0.7.1: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated CSSselect@0.4.1: the module is now available as 'css-select'
npm WARN deprecated hoek@2.16.3: The major version is no longer supported. Please update to 4.x or newer
npm WARN deprecated lodash-node@2.4.1: This package is discontinued. Use lodash@^4.0.0.
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated mailcomposer@0.2.12: This project is unmaintained
npm WARN deprecated CSSwhat@0.4.7: the module is now available as 'css-what'
npm WARN deprecated hoek@0.9.1: The major version is no longer supported. Please update to 4.x or newer
npm WARN deprecated mimelib@0.2.19: This project is unmaintained
npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm ERR! code 1
npm ERR! Command failed: /usr/local/bin/git checkout 4.0
npm ERR! error: pathspec '4.0' did not match any file(s) known to git.
npm ERR!

npm ERR! A complete log of this run can be found in:
npm ERR!     ~/.npm/_logs/2018-11-01T17_39_18_976Z-debug.log
cat  ~/.npm/_logs/2018-11-01T17_39_18_976Z-debug.log

shows the error...

2436 silly fetchPackageMetaData error for gulp@git+https://github.com/gulpjs/gulp.git#4.0 Command failed: /usr/local/bin/git checkout 4.0
2436 silly fetchPackageMetaData error: pathspec '4.0' did not match any file(s) known to git.

I'm running...

 $ npm -v
6.4.1
 $ node -v
v11.0.0

on Mac OS X High Sierra 10.13.6 (17G65).

Todmy commented 5 years ago

got the same problem. The solution: to change in package.json line from "gulp": "git+https://github.com/gulpjs/gulp.git#4.0", to "gulp": "git+https://github.com/gulpjs/gulp#v4.0.0", and run npm i manually.

ncoden commented 5 years ago

Should be fixed by https://github.com/zurb/foundation-emails-template/pull/55

luisreyes commented 5 years ago

Should be fixed by zurb/foundation-emails-template#55

Just ran into this issue. @Todmy's solution fixed it.

jstef53 commented 5 years ago

So how to do I go about to change the line i.e "gulp": "git+https://github.com/gulpjs/gulp.git#4.0", to "gulp": "git+https://github.com/gulpjs/gulp#v4.0.0",?

luisreyes commented 5 years ago

So how to do I go about to change the line i.e "gulp": "git+https://github.com/gulpjs/gulp.git#4.0", to "gulp": "git+https://github.com/gulpjs/gulp#v4.0.0",?

@jstef53 In your project's package.json file. Under devDependencies find gulp. Replace git+https://github.com/gulpjs/gulp.git#4.0 with git+https://github.com/gulpjs/gulp#v4.0.0

Jakob-Jordan-SpotShot commented 5 years ago

@luisreyes solved the problem for me...still an issue obviously with the latest package installing via npm / website doc...

DanielRuf commented 5 years ago

Replace git+https://github.com/gulpjs/gulp.git#4.0 with git+https://github.com/gulpjs/gulp#v4.0.0

This is not the right solution. Please use "gulp": "^4.0.0"

DanielRuf commented 5 years ago

Tags are not the right solution as these could be removed at any time.

JHunnicutt commented 5 years ago

I change gulp to "^4.0.0" within the packages.json file and run npm install. The install fails as node_modules is not installed and I have been returned a series of errors.

npm ERR! path /Users/admin/.npm/_cacache/index-v5/93/fe
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall mkdir
npm ERR! Error: EACCES: permission denied, mkdir '/Users/admin/.npm/_cacache/index-v5/93/fe'
npm ERR!  { [Error: EACCES: permission denied, mkdir '/Users/admin/.npm/_cacache/index-v5/93/fe']
npm ERR!   cause:
npm ERR!    { Error: EACCES: permission denied, mkdir '/Users/admin/.npm/_cacache/index-v5/93/fe'
npm ERR!      errno: -13,
npm ERR!      code: 'EACCES',
npm ERR!      syscall: 'mkdir',
npm ERR!      path: '/Users/admin/.npm/_cacache/index-v5/93/fe' },
npm ERR!   isOperational: true,
npm ERR!   stack:
npm ERR!    'Error: EACCES: permission denied, mkdir \'/Users/admin/.npm/_cacache/index-v5/93/fe\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: '/Users/admin/.npm/_cacache/index-v5/93/fe',
npm ERR!   parent: 'hgemails' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/admin/.npm/_logs/2019-06-12T10_57_06_128Z-debug.log
DanielRuf commented 5 years ago

@JHunnicutt This is a permission issue with your npm setup and the npm cache and not related to this. Please check the owner of /Users/admin/.npm/_cacache/.