The main installation issue for gruntjs is for use with Bootstrap

Apologies for the vague heading - not sure how else the word was.

In principle, I have problems with grunts. A few weeks ago I installed the source code of Bootstrap as well as Grunt. Everything worked fine when I started grunt, my LESS compiled into CSS.

I returned to the same installation a few days ago, and Grunt did not execute. It doesn’t even try to compile any LESS files, and I received messages about missing and / or unsatisfied dependencies of Grunt (despite the fact that my NPMs and nodes were updated both in my user account and in the root directory). I thought little of this and decided to reinstall the grunt, but to no avail.

For now, I just deleted my bootstrap directory completely under public_html. Then I cloned from Github. I checked the cloned repo and everything looks good, it even includes a folder called "grunt" with Gruntfile.js under it. I guess this came from a Git clone, which is very useful, but it still doesn't work in the end.

I run gruntand meet with ...

module.js:340
throw err;
      ^
Error: Cannot find module 'coffee-script'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous>(/var/www/andrewtanner.me/public_html/bootstrap/node_modules/grunt/lib/grunt.js:16:1)
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)

Then I run npm installto try to install the correct dependencies based on package.json, but I met with ...

npm WARN prefer global grunt-cli@0.1.13 should be installed with -g
npm WARN unmet dependency /var/www/andrewtanner.me/public_html/bootstrap/node_modules/grunt/node_modules/findup-sync requires glob@'~3.2.9' but will load
npm WARN unmet dependency /var/www/andrewtanner.me/public_html/bootstrap/node_modules/grunt/node_modules/glob,
npm WARN unmet dependency which is version 3.1.21
npm WARN unmet dependency /var/www/andrewtanner.me/public_html/bootstrap/node_modules/grunt/node_modules/findup-sync requires lodash@'~2.4.1' but will load

(I shortened this to keep scrolling)

I have a complete loss here. I am running npm 1.4.6 and nodejs 0.10.26, so I don’t know wht Grunt will not start, especially considering that I had this before, without any problems.

: Ubuntu 14.04 ( 12.04), npm install. , , Grunt /.

phantomjs@1.9.7-5 install/var/www/dev.andrewtanner.me/public_html/bootstrap/ node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs node install.js sh: 1: node: npm WARN "node" npm WARN , , /usr/share/doc/nodejs/README.Debian npm ERR! 127 npm ERR! 0

, ?

- .

+4
1

Ubuntu 14.04 Bootstrap 3.2.0. node.js:

sudo apt-get install nodejs-legacy

npm install, .

:

node_modules npm install , , , .

grunt dist :

Loading Gruntfile.js...^^^ERROR
Error: Cannot find module 'error/validation'

node_modules npm install .

+11

Source: https://habr.com/ru/post/1538006/


All Articles