Giter Site home page Giter Site logo

Bower:install fatal error about csv-to-json HOT 9 OPEN

cparker15 avatar cparker15 commented on May 27, 2024
Bower:install fatal error

from csv-to-json.

Comments (9)

hhzl avatar hhzl commented on May 27, 2024 4

The Gruntfile.js task for the bower installation causes the problem.

A contribution towards a solution:

Deactivate the bower installation task in the Gruntfile and run the bower installation manually; then grunt runs fine and produces the result in the dist directory

Change 1 to Gruntfile.js: Deactivate bower installation task

  // Default task(s).
    grunt.registerTask('default', [
        'clean:build', // start with a clean slate
        'clean:dist',

        'jshint',     // lint our JS in src/
        'copy:build', // copy our JS from src/ to build/

        // 'bower',              // install Bower components
        'shell:bower_csv-js', // run post-install commands
        'copy:bower',         // copy Bower components to build/lib/

        'copy:dist', // copy everything to dist/

        'clean:build' // cleanup build/
    ]);
};

Change 2 to Gruntfile.js: Deactivate removal of 'bower_components' directory

Part of Gruntfile.js before change

.....
  clean: {
            build: ['build', 'bower_components'],
            dist:  ['dist']
        }
.....

After

......
       clean: {
            build: ['build'],
            dist:  ['dist']
        }
.....

Manual installation with bower

As the Gruntfile.js does now has a deactivated bower installation task run it manually before running grunt.

$ bower install git://github.com/cparker15/CSV-js.git
bower json2#*               not-cached git://github.com/douglascrockford/JSON-js.git#*
bower json2#*                  resolve git://github.com/douglascrockford/JSON-js.git#*
....
bower json2#*                 checkout master
...
csv-js#0.2.5 bower_components/csv-js

json2#c98948ae19 bower_components/json2

Running grunt is fine then

$ grunt
Running "clean:build" (clean) task
Cleaning "bower_components"...OK

Running "clean:dist" (clean) task
Cleaning "dist"...OK

Running "jshint:all" (jshint) task
>> 2 files lint free.

Running "copy:build" (copy) task
Created 2 directories, copied 2 files

Running "shell:bower_csv-js" (shell) task

Running "copy:bower" (copy) task


Running "copy:dist" (copy) task
Created 2 directories, copied 2 files

Running "clean:build" (clean) task
Cleaning "build"...OK

Done, without errors.

Result

The result of the build is in the dist directory. It runs fine.

Need

Fix the file Gruntfile.js so that the bower task runs fine.

The area to fix is

....
  bower: {
            install: {
                options: {
                    copy: false // leave components in bower_components/
                }
            }
        },
....

from csv-to-json.

laurahk avatar laurahk commented on May 27, 2024 4

Thank you very much for the detailed solution. I should have posted earlier, but I actually found that updating to the latest version of bower in package.json solved this issue for me:

"grunt-bower-task": "0.4.0"

from csv-to-json.

joejoseph00 avatar joejoseph00 commented on May 27, 2024 2

@haythamdouaihy , @laurahk has a better solution, update the grunt-bower-task to 0.4.0 in the package.json
this works on Ubuntu 16.04.4 with npm and nodejs installed through package manager.

from csv-to-json.

haythamdouaihy avatar haythamdouaihy commented on May 27, 2024 1

The problem is just in NPM dependencies which are outdated; you have to update them to their latest to make the converter work correctly.

from csv-to-json.

tranlm avatar tranlm commented on May 27, 2024

I went through all the installation instructions and ran into this issue as well. Anyone have any ideas?
Thanks!

from csv-to-json.

archywillhe avatar archywillhe commented on May 27, 2024

Yup. I got into the same issue too.

from csv-to-json.

laurahk avatar laurahk commented on May 27, 2024

same issue - any solutions found?

from csv-to-json.

gentunian avatar gentunian commented on May 27, 2024

Great @laurahk , thanks. Worked for me too.

from csv-to-json.

collinmcrae avatar collinmcrae commented on May 27, 2024

Thanks, worked like a charm!

from csv-to-json.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.