Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grunt fails while installing modules #56

Closed
marco-gallinari opened this issue Mar 8, 2015 · 5 comments
Closed

grunt fails while installing modules #56

marco-gallinari opened this issue Mar 8, 2015 · 5 comments
Assignees
Labels

Comments

@marco-gallinari
Copy link

After init app, grunt tasks fail installing standard backend modules.

⇒  clever install clever-odm
Attempting to install clever-odm...
  ├── Searching for modules...
  ├──   Searching NPM...
  ├──   Searching Bower...
  ├── ⚠ Installing clever-odm...
  ├── Installing NPM modules for clever-odm...
✔    Successfully installed clever-odm...
  ├── Installing bundledDependencies...
  ├── ⚠ Running grunt tasks for module clever-odm...
Loading "Gruntfile.js" tasks...ERROR
>> Error: Cannot find module 'utils'
Warning: Task "readme" not found. Use --force to continue.

Aborted due to warnings.
✔  Successfully installed.
⇒  clever install clever-auth 
Attempting to install clever-auth...
  ├── Searching for modules...
  ├──   Searching NPM...
  ├──   Searching Bower...
  ├── ⚠ Installing clever-auth...
  ├── Installing NPM modules for clever-auth...
✔    Successfully installed clever-auth...
  ├── Installing bundledDependencies...
  ├── ⚠ Running grunt tasks for module clever-auth...
Loading "Gruntfile.js" tasks...ERROR
>> Error: Cannot find module 'utils'
Warning: Task "prompt:cleverAuthConfig" not found. Use --force to continue.

Aborted due to warnings.
✔  Successfully installed.
⇒  clever install clever-users
Attempting to install clever-users...
  ├── Searching for modules...
  ├──   Searching NPM...
  ├──   Searching Bower...
  ├── ⚠ Installing clever-users...
  ├── Installing NPM modules for clever-users...
✔    Successfully installed clever-users...
  ├── Installing bundledDependencies...
Possibly unhandled TypeError: Object Error: Cannot find module 'config' has no method 'match'
    at /usr/local/lib/node_modules/cleverstack-cli/lib/util/grunt.js:73:26
From previous event:
    at new Promise (/usr/local/lib/node_modules/cleverstack-cli/node_modules/bluebird/js/main/promise.js:84:37)
    at exports.findGruntFile (/usr/local/lib/node_modules/cleverstack-cli/lib/util/grunt.js:91:12)
    at /usr/local/lib/node_modules/cleverstack-cli/lib/util/grunt.js:67:9
From previous event:
    at new Promise (/usr/local/lib/node_modules/cleverstack-cli/node_modules/bluebird/js/main/promise.js:84:37)
    at exports.readTasks (/usr/local/lib/node_modules/cleverstack-cli/lib/util/grunt.js:62:12)
    at /usr/local/lib/node_modules/cleverstack-cli/lib/util/grunt.js:182:9
From previous event:
    at new Promise (/usr/local/lib/node_modules/cleverstack-cli/node_modules/bluebird/js/main/promise.js:84:37)
    at Object.exports.runTasks (/usr/local/lib/node_modules/cleverstack-cli/lib/util/grunt.js:181:12)
    at /usr/local/lib/node_modules/cleverstack-cli/lib/install.js:131:46
    at iterate (/usr/local/lib/node_modules/cleverstack-cli/node_modules/async/lib/async.js:149:13)
    at Object.async.eachSeries (/usr/local/lib/node_modules/cleverstack-cli/node_modules/async/lib/async.js:165:9)
    at /usr/local/lib/node_modules/cleverstack-cli/lib/install.js:127:39
From previous event:
    at new Promise (/usr/local/lib/node_modules/cleverstack-cli/node_modules/bluebird/js/main/promise.js:84:37)
    at Object.exports.addToMainBundleDeps (/usr/local/lib/node_modules/cleverstack-cli/lib/util/dependencies.js:92:12)
    at /usr/local/lib/node_modules/cleverstack-cli/lib/install.js:124:30
    at done (/usr/local/lib/node_modules/cleverstack-cli/node_modules/async/lib/async.js:135:19)
    at /usr/local/lib/node_modules/cleverstack-cli/node_modules/async/lib/async.js:32:16
    at /usr/local/lib/node_modules/cleverstack-cli/lib/install.js:115:33
From previous event:
    at new Promise (/usr/local/lib/node_modules/cleverstack-cli/node_modules/bluebird/js/main/promise.js:84:37)
    at Object.exports.installBundleDeps (/usr/local/lib/node_modules/cleverstack-cli/lib/util/dependencies.js:17:12)
    at /usr/local/lib/node_modules/cleverstack-cli/lib/install.js:113:30
    at /usr/local/lib/node_modules/cleverstack-cli/node_modules/async/lib/async.js:125:13
    at Array.forEach (native)
    at _each (/usr/local/lib/node_modules/cleverstack-cli/node_modules/async/lib/async.js:46:24)
    at Object.async.each (/usr/local/lib/node_modules/cleverstack-cli/node_modules/async/lib/async.js:124:9)
    at EventEmitter.<anonymous> (/usr/local/lib/node_modules/cleverstack-cli/lib/install.js:109:23)
@pilsy
Copy link
Contributor

pilsy commented Mar 10, 2015

@marco-gallinari this looks like it's caused by the NODE_PATH, what is your NODE_PATH set to (if at all) ?

echo $NODE_PATH

@pilsy pilsy added the bug label Mar 10, 2015
@pilsy pilsy self-assigned this Mar 10, 2015
@marco-gallinari
Copy link
Author

@pilsy you're right, my env variables were missing NODE_PATH variable.
I've added it to /etc/environment but unfortunately the error is still there...

⇒  echo $NODE_PATH          
/usr/local/lib/node_modules

⇒  clever install clever-odm
Attempting to install clever-odm...
  ├── Searching for modules...
  ├──   Searching NPM...
  ├──   Searching Bower...
  ├── ⚠ Installing clever-odm...
  ├── Installing NPM modules for clever-odm...
✔    Successfully installed clever-odm...
  ├── Installing bundledDependencies...
  ├── ⚠ Running grunt tasks for module clever-odm...
Loading "Gruntfile.js" tasks...ERROR
>> Error: Cannot find module 'utils'
Warning: Task "readme" not found. Use --force to continue.

Aborted due to warnings.
✔  Successfully installed.

@pilsy
Copy link
Contributor

pilsy commented Mar 11, 2015

So by the looks of it you have not correctly set your NODE_PATH, take a look at http://cleverstack.io/documentation/backend/#backend-magic-modules for details.

export NODE_PATH=./lib/:./modules/:$NODE_PATH will work for you

Overall this is still an issue, you should not have to set your NODE_PATH for clever commands, i'm taking a look at it now...

@marco-gallinari
Copy link
Author

Thank you, this fixed my problems.

My two cents, this issue appeared in the last 15 days, since I was able to use the cli without errors on 28th feb.

@pilsy pilsy closed this as completed in d8601db Mar 16, 2015
@pilsy
Copy link
Contributor

pilsy commented Mar 16, 2015

Thanks @marco-gallinari, i just fixed the issue 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants