lykmapipo / sails-hook-validation

Custom validation error messages for sails model with i18n support
104 stars 29 forks source link

Installation error #36

Closed ImanMh closed 8 years ago

ImanMh commented 8 years ago

as soon as I run

npm install --save sails-hook-validation

I can no more lift the sail. I get this error instaead

error: Error: Cannot find module 'sails/node_modules/waterline/lib/waterline/query/deferred'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/Users/Iman/Documents/projects/squirl/squirl-server/node_modules/sails-hook-validation/lib/create.js:5:16)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/Users/Iman/Documents/projects/squirl/squirl-server/node_modules/sails-hook-validation/index.js:10:14)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
rvanzon commented 8 years ago

Not sure. This seems a Sails/Waterline problem with NPM 3.x. Go to ./node_modules/sails and do npm install waterline (this is a workaround of course)

ImanMh commented 8 years ago

didn't work for me.

by the way:

→ node -v
v0.12.5

→ npm -v
3.5.0
einfallstoll commented 8 years ago

If you would use the search instead of opening an issue, you knew that issue was already opened in #25 and it's been discussed that it's already merged, but not published.

As a temporary workaround I suggest tho install from the git repo instead from npm:

npm install --save lykmapipo/sails-hook-validation#a2cdc85a8ab8784478e1348394d379d16d4aafa9
ImanMh commented 8 years ago

If you would read my comments you knew that I figured the problem is from npm version after the issue.