Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
222 views
in Technique[技术] by (71.8m points)

node.js - Cannot find module 'findup-sync' when trying to run grunt

I am having trouble running grunt-cli after installing it. I run

npm install -g grunt-cli

then running grunt errors with

    node.js:63
    throw e;
    ^
Error: Cannot find module 'findup-sync'
    at loadModule (node.js:275:15)
    at require (node.js:411:14)
    at Object.<anonymous> (/home/tmartin/bin/grunt:9:14)
    at Module._compile (node.js:462:23)
    at Module._loadScriptSync (node.js:469:10)
    at Module.loadSync (node.js:338:12)
    at Object.runMain (node.js:522:24)
    at Array.<anonymous> (node.js:756:12)
    at EventEmitter._tickCallback (node.js:55:22)
    at node.js:773:9

This is what I have installed:

tmartin@timcomp:~$ npm list -g
/home/tmartin/lib
└─┬ [email protected]
  ├─┬ [email protected]
  │ ├─┬ [email protected]
  │ │ ├── [email protected]
  │ │ ├── [email protected]
  │ │ └─┬ [email protected]
  │ │   ├── [email protected]
  │ │   └── [email protected]
  │ └── [email protected]
  └─┬ [email protected]
    └── [email protected]
question from:https://stackoverflow.com/questions/15444020/cannot-find-module-findup-sync-when-trying-to-run-grunt

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I got mine running again reinstalling grunt-cli globally and in my repo.

npm install -g grunt-cli

cd myrepo

npm install grunt-cli

I think Yosemite installation broke some things in my files ...


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...