2015-09-03 61 views
0

,我發現了生產服務器上的這個錯誤(本地優良Windows和OSX)格朗特/ NPM錯誤(Ubuntu的LTS 14.04.3)

/home/myuser/my-app/node_modules/grunt/node_modules/findup-sync/lib/findup-sync.js:33 
}).flatten().uniq().value(); 
^
TypeError: undefined is not a function 
    at Object.module.exports [as findup] (/home/myuser/my-app/node_modules/grunt/node_modules/findup-sync/lib/findup-sync.js:33:8) 
    at Task.task.init (/home/myuser/my-app/node_modules/grunt/lib/grunt/task.js:427:16) 
    at Object.grunt.tasks (/home/myuser/my-app/node_modules/grunt/lib/grunt.js:120:8) 
    at Object.module.exports [as cli] (/home/myuser/my-app/node_modules/grunt/lib/grunt/cli.js:38:9) 
    at Object.<anonymous> (/usr/local/lib/node_modules/grunt-cli/bin/grunt:45:20) 
    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 Function.Module.runMain (module.js:501:10) 

到目前爲止,我試圖消除節點模塊,清除緩存並重新安裝,但沒有成功。

rm -rf node_modules && npm cache clean && npm install 

我也嘗試安裝它的模塊抱怨:

npm install findup-sync -g && npm link findup-sync 

而且我檢查了我的的.gitignore文件包含DIST文件夾

我要去粘貼我的package.json和bower.json文件的任何幫助將不勝感激。

謝謝!

package.json

{ 
    "name": "myapp", 
    "version": "1.0.0", 
    "dependencies": { 
    "bower": "^1.4.1", 
    "grunt": "^0.4.5", 
    "grunt-cli": "^0.1.13", 
    "connect-modrewrite": "^0.8.2", 
    "grunt-autoprefixer": "^3.0.3", 
    "grunt-concurrent": "^2.0.2 ", 
    "grunt-contrib-clean": "^0.6.0", 
    "grunt-contrib-compass": "^1.0.3", 
    "grunt-contrib-concat": "^0.5.1", 
    "grunt-contrib-connect": "^0.8.0", 
    "grunt-contrib-copy": "^0.8.1", 
    "grunt-contrib-cssmin": "^0.13.0", 
    "grunt-contrib-htmlmin": "^0.4.0", 
    "grunt-contrib-imagemin": "^0.9.4", 
    "grunt-contrib-jshint": "^0.11.2", 
    "grunt-contrib-uglify": "^0.9.1", 
    "grunt-contrib-watch": "^0.6.1", 
    "grunt-filerev": "^2.3.1", 
    "grunt-google-cdn": "^0.4.3", 
    "grunt-newer": "^1.1.1", 
    "grunt-ng-annotate": "^1.0.1", 
    "grunt-svgmin": "^2.0.1", 
    "grunt-usemin": "^3.1.0", 
    "grunt-wiredep": "^2.0.0", 
    "load-grunt-tasks": "^3.2.0", 
    "time-grunt": "^1.2.1", 
    "grunt-ng-constant": "^1.1.0", 
    "jasmine-core": "^2.3.4", 
    "grunt-karma": "^0.12.0", 
    "connect-livereload": "^0.5.3", 
    "jshint-stylish": "^2.0.1", 
    "karma": "^0.13.9", 
    "karma-jasmine": "^0.3.5", 
    "karma-phantomjs-launcher": "^0.2.1", 
    "phantomjs": "^1.9.18" 
    } 
} 

bower.json

{ 
    "name": "myapp", 
    "version": "0.0.1", 
    "dependencies": { 
    "angular": "^1.3.0", 
    "json3": "^3.3.0", 
    "es5-shim": "^4.0.0", 
    "bootstrap-sass-official": "^3.3.5", 
    "angular-animate": "^1.3.0", 
    "angular-cookies": "~1.4.0", 
    "angular-messages": "^1.3.0", 
    "angular-resource": "^1.3.0", 
    "angular-route": "^1.3.0", 
    "angular-sanitize": "^1.3.0", 
    "angular-touch": "^1.3.0", 
    "angular-bootstrap": "~0.12.0", 
    "font-awesome": "~4.2.0", 
    "angular-progress-arc": "~1.0.0", 
    "angular-xeditable": "~0.1.9", 
    "angular-moment": "~0.10.1", 
    "angular-native-picker": "~1.0.4", 
    "angular-sweetalert": "~1.1.0", 
    "angular-base64": "~2.0.5", 
    "angular-timer": "~1.3.3", 
    "angular-bootstrap-colorpicker": "~3.0.18" 
    }, 
    "devDependencies": { 
    }, 
    "appPath": "app", 
    "resolutions": { 
    "angular": "1.4.4" 
    } 
} 
+0

你可以打開'/ home/myuser/my-app/node_modules/grunt/node_modules/findup-sync/package.json'並查看'version'屬性是什麼,那麼將它與你在本地/開發中運行的內容進行比較? – Matt

+0

嗨馬特,感謝您的幫助,所以如果我查看該文件夾,那裏只有'findup-sync.js',沒有'packages.json'文件。 – Vasi

+0

我要求你查看'/ home/myuser/my-app/node_modules/grunt/node_modules/findup-sync /',而不是'/ home/myuser/my-app/node_modules/grunt/node_modules/findup-同步/ LIB /'。 – Matt

回答

相關問題