tstone / Gradient.js

A class for generating gradients

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

npm install gradient is not working

cmdelatorre opened this issue · comments

I don't know why but it seems as if it is not installing correctly. This is what I'm doing:

$ npm install color

...
color@0.7.3 node_modules/color
├── color-string@0.2.1
└── color-convert@0.5.2

$ npm install gradient

...
gradient@0.2.0 node_modules/gradient

$ node

> var c = require('color');

undefined

> var Gradient = require('gradient');

Error: Cannot find module '/color'
at Function.resolve (/.../node_modules/gradient/gradient.js:41:15)
at require (/.../node_modules/gradient/gradient.js:3:28)
at /.../node_modules/gradient/gradient.js:2027:9
at Object. (/.../node_modules/gradient/gradient.js:2027:28)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)

Same here.

Hi,

Deleting gradient.js and gradient.min.js builds from the root dir fixed this for me.

Additionally - if you want to deploy with a Gradient.js dependency, update the repo url to https://github.com/leigh-johnson/Gradient.js.git until my pull request is accepted.

For example, my package.json intended for a Heroku build:

{ "dependencies": { "gradient": "leigh-johnson/Gradient.js" } }

commented

thank you, it's work for me.