[Resolved] grunt assertion `args[1]->isstring()’ failed.

Grunt is a powerful tool to create build files for production and development. A few days back I was handed over an old AngularJs project which was developed by some earlier teams.

I was struggling to create build and learned some new technologies while resolving the process like Yoeman. Just writing it up to share with anybody to save some time and facing the same issues.

First, let’s check what is Yoeman.

Yeoman is an open source client-side scaffolding tool for web applications. Yeoman runs as a command-line interface written for Node.js and combines several functions into one place, such as generating a starter template, managing dependencies, running unit tests, providing a local development server, and optimizing production code for deployment.

So basically I faced the following two issues:


Issue 1#

Can’t find config file: .jshintrc

Running "jshint:all" (jshint) task
ERROR: Can't find config file: .jshintrc

This issue is caused when there is no file looking like .jshintrc . This file is created by Yoeman to have a configuration on how to check files for common obvious errors.

In the Gruntfile.js when we have a block as shown below:

   // Make sure there are no obvious mistakes
    jshint: {
      options: {
        jshintrc: '.jshintrc',
        reporter: require('jshint-stylish')
      all: {
        src: [
          '<%= yeoman.app %>/scripts/{,*/}*.js'
      test: {
        options: {
          jshintrc: 'test/.jshintrc'
        src: ['test/spec/{,*/}*.js']

Then this issue is caused.

Solution 1: Just comment out the jshint: {...} block

Solution 2: Create a new file .jshintrc at project root. You can get a reference from this about default configuration properties.

In my case, I just added {} in the .jshintrc file 😛 as I was just supposed to make a small change and create a build in no time.



Issue 2#

grunt assertion `args[1]->isstring()’ failed.

Solution: Just delete node_modules folder and package-lock.json file at project root and run following npm command

$ npm install --unsafe-perm=true

After that, you can run the grunt command easily and create the dist folder.

Source Link


Hope this post will help in case you are also stuck due to these common issues.

Leave a Comment

Your email address will not be published. Required fields are marked *

istanbul escortHacklinkartvin escortGiresun escortEscortporno izleizmir escortsincan escortistanbul escortizmir escortGaziantep escortşişli escortkartal escortbodrum escortAntalya escortMarmaris escortpornoankara escortistanbul escorthttps://escortcity.net/Ankara çilingironwin girişHacklink satın alçankaya escortAyvalık Escortkütahya escortgümüşhane escortAksaray escortaydın escortkayseri escortçankaya escortkızılay escortkeçiören escorthepabeteryaman escortKiralık Bahis Siteleribonus veren sitelerKiralık Bahis SiteleriKiralık Bahis SayfasıAviator oynaCasinoslotdiyarbet girişgates of olympus oynasugar rush oynaSweet bonanza demowild west gold demo oynabodrum escortbodrum escortçeşme escortbig bass bonanza oynaredbullholdenracing.com
Diş eti ağrısıankara kocaeli nakliyatgüvenlik bariyerisakarya evden eve nakliyatgaziantep evden eve nakliyatnargilehttps://www.orneknakliyat.comseowordpress en iyi seo eklentileripuro satın alizmir saç ekimiistanbul evden eve nakliyatimplantbebekeskişehir inşaat şirketleriantika eşya alanlarantika eşya alanlarantalya haberpgcdpmsagaziantep boşanma avukatıAntika alan yerlermaltepe antika eşya alanlarGaziantep Evden Eve TaşımacılıkGaziantep Halı Yıkamaizmir escortetiler antika eşya alanlaretiler antika eşya alanlarantika alanlarAccident LawyerDental Implantiqoseskişehir pelet kazanı