Skip to main content
added 782 characters in body
Source Link

I am hosted at Nexcess and tried to implement Grunt to assist with LESS development. I followed the Magento 2 docs for installing grunt. NodeJS 10.10.0 is installed.

The first deviation from the instructions has to do with how grunt, grunt-cli, and lessc were installed. The instructions say to install globally, with the -g parameter, but as this is shared hosting, that's not possible.

So instead I install locally to ~/public_html/. This creates a node_modules folder. This was followed up with npm install and npm update. I can now run grunt with its full path from the magento public_html folder, but I get an error:

~/public_html/node_modules/grunt-cli/bin/grunt exec:blank

 [public_html]$ ./node_modules/grunt-cli/bin/grunt exec:blank
Running "exec:blank" (exec) task
  /bin/sh: grunt: command not found
  Exited with code: 127.
  Error executing child process: Error: Process exited with code 127.
Warning: Task "exec:blank" failed. Use --force to continue.

Aborted due to warnings.

Running the clean: or less: commands both work on the blank theme. Only exec fails.. That is, I should say.. clean:blank works while less:blank results in some additional messages that I am not sure how to explain:

 public_html]$ ./node_modules/grunt-cli/bin/grunt less:ms
Running "less:ms" (less) task
>> Destination pub/static/frontend/MS/theme-frontend-ms/en_US/css/styles-m.css not written because no source files were found.
>> Destination pub/static/frontend/MS/theme-frontend-ms/en_US/css/styles-l.css not written because no source files were found.
>> Destination pub/static/frontend/MS/theme-frontend-ms/en_US/css/email.css not written because no source files were found.
>> Destination pub/static/frontend/MS/theme-frontend-ms/en_US/css/email-inline.css not written because no source files were found.

I am hosted at Nexcess and tried to implement Grunt to assist with LESS development. I followed the Magento 2 docs for installing grunt. NodeJS 10.10.0 is installed.

The first deviation from the instructions has to do with how grunt, grunt-cli, and lessc were installed. The instructions say to install globally, with the -g parameter, but as this is shared hosting, that's not possible.

So instead I install locally to ~/public_html/. This creates a node_modules folder. This was followed up with npm install and npm update. I can now run grunt with its full path from the magento public_html folder:

~/public_html/node_modules/grunt-cli/bin/grunt exec:blank

 [public_html]$ ./node_modules/grunt-cli/bin/grunt exec:blank
Running "exec:blank" (exec) task
  /bin/sh: grunt: command not found
  Exited with code: 127.
  Error executing child process: Error: Process exited with code 127.
Warning: Task "exec:blank" failed. Use --force to continue.

Aborted due to warnings.

Running the clean: or less: commands both work on the blank theme. Only exec fails..

I am hosted at Nexcess and tried to implement Grunt to assist with LESS development. I followed the Magento 2 docs for installing grunt. NodeJS 10.10.0 is installed.

The first deviation from the instructions has to do with how grunt, grunt-cli, and lessc were installed. The instructions say to install globally, with the -g parameter, but as this is shared hosting, that's not possible.

So instead I install locally to ~/public_html/. This creates a node_modules folder. This was followed up with npm install and npm update. I can now run grunt with its full path from the magento public_html folder, but I get an error:

~/public_html/node_modules/grunt-cli/bin/grunt exec:blank

 [public_html]$ ./node_modules/grunt-cli/bin/grunt exec:blank
Running "exec:blank" (exec) task
  /bin/sh: grunt: command not found
  Exited with code: 127.
  Error executing child process: Error: Process exited with code 127.
Warning: Task "exec:blank" failed. Use --force to continue.

Aborted due to warnings.

Running the clean: or less: commands both work on the blank theme. Only exec fails.. That is, I should say.. clean:blank works while less:blank results in some additional messages that I am not sure how to explain:

 public_html]$ ./node_modules/grunt-cli/bin/grunt less:ms
Running "less:ms" (less) task
>> Destination pub/static/frontend/MS/theme-frontend-ms/en_US/css/styles-m.css not written because no source files were found.
>> Destination pub/static/frontend/MS/theme-frontend-ms/en_US/css/styles-l.css not written because no source files were found.
>> Destination pub/static/frontend/MS/theme-frontend-ms/en_US/css/email.css not written because no source files were found.
>> Destination pub/static/frontend/MS/theme-frontend-ms/en_US/css/email-inline.css not written because no source files were found.
typo
Source Link

I am hosted at Nexcess and tried to implement Grunt to assist with LESS development. I followed the Magento 2 docs for installing grunt. NodeJS 10.10.0 is installed.

The first deviation from the instructions has to do with how grunt, grunt-cli, and lessc were installed. The instructions say to install globally, with the -g commandparameter, but as this is shared hosting, that's not possible.

So instead I install locally to ~/public_html/. This creates a node_modules folder. This was followed up with npm install and npm update. I can now run grunt with its full path from the magento public_html folder:

~/public_html/node_modules/grunt-cli/bin/grunt exec:blank

 [public_html]$ ./node_modules/grunt-cli/bin/grunt exec:blank
Running "exec:blank" (exec) task
  /bin/sh: grunt: command not found
  Exited with code: 127.
  Error executing child process: Error: Process exited with code 127.
Warning: Task "exec:blank" failed. Use --force to continue.

Aborted due to warnings.

Running the clean: or less: commands both work on the blank theme. Only exec fails..

I am hosted at Nexcess and tried to implement Grunt to assist with LESS development. I followed the Magento 2 docs for installing grunt. NodeJS 10.10.0 is installed.

The first deviation from the instructions has to do with how grunt, grunt-cli, and lessc were installed. The instructions say to install globally, with the -g command, but as this is shared hosting, that's not possible.

So instead I install locally to ~/public_html/. This creates a node_modules folder. This was followed up with npm install and npm update. I can now run grunt with its full path from the magento public_html folder:

~/public_html/node_modules/grunt-cli/bin/grunt exec:blank

 [public_html]$ ./node_modules/grunt-cli/bin/grunt exec:blank
Running "exec:blank" (exec) task
  /bin/sh: grunt: command not found
  Exited with code: 127.
  Error executing child process: Error: Process exited with code 127.
Warning: Task "exec:blank" failed. Use --force to continue.

Aborted due to warnings.

Running the clean: or less: commands both work on the blank theme. Only exec fails..

I am hosted at Nexcess and tried to implement Grunt to assist with LESS development. I followed the Magento 2 docs for installing grunt. NodeJS 10.10.0 is installed.

The first deviation from the instructions has to do with how grunt, grunt-cli, and lessc were installed. The instructions say to install globally, with the -g parameter, but as this is shared hosting, that's not possible.

So instead I install locally to ~/public_html/. This creates a node_modules folder. This was followed up with npm install and npm update. I can now run grunt with its full path from the magento public_html folder:

~/public_html/node_modules/grunt-cli/bin/grunt exec:blank

 [public_html]$ ./node_modules/grunt-cli/bin/grunt exec:blank
Running "exec:blank" (exec) task
  /bin/sh: grunt: command not found
  Exited with code: 127.
  Error executing child process: Error: Process exited with code 127.
Warning: Task "exec:blank" failed. Use --force to continue.

Aborted due to warnings.

Running the clean: or less: commands both work on the blank theme. Only exec fails..

Source Link

locally installed grunt, "grunt exec:blank" fails with "/bin/sh: grunt: command not found"

I am hosted at Nexcess and tried to implement Grunt to assist with LESS development. I followed the Magento 2 docs for installing grunt. NodeJS 10.10.0 is installed.

The first deviation from the instructions has to do with how grunt, grunt-cli, and lessc were installed. The instructions say to install globally, with the -g command, but as this is shared hosting, that's not possible.

So instead I install locally to ~/public_html/. This creates a node_modules folder. This was followed up with npm install and npm update. I can now run grunt with its full path from the magento public_html folder:

~/public_html/node_modules/grunt-cli/bin/grunt exec:blank

 [public_html]$ ./node_modules/grunt-cli/bin/grunt exec:blank
Running "exec:blank" (exec) task
  /bin/sh: grunt: command not found
  Exited with code: 127.
  Error executing child process: Error: Process exited with code 127.
Warning: Task "exec:blank" failed. Use --force to continue.

Aborted due to warnings.

Running the clean: or less: commands both work on the blank theme. Only exec fails..