question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue installing certain dependencies

See original GitHub issue

I’m not exactly sure how to describe this one. I’ve got a couple packages in my bower.json that won’t copy over to my targetDir. It’s not entirely consistent though. It only has trouble copying over one package at a time.

For instance, I have the jsx-requirejs-plugin and requirejs-text dependencies defined in my bower.json. Whenever I run grunt bower:install I get:

Fatal error: ENOENT, no such file or directory 'vendor/assets/components/jsx-requirejs-plugin'

If I remove jsx-requirejs-plugin I then get:

Fatal error: ENOENT, no such file or directory 'vendor/assets/components/requirejs-text'

If I then remove requirejs-text then grunt bower:install works.

If I just do a straight up bower install I don’t have any problems. Everything shows up properly in my targetDir.

If I look in my targetDir when the errors occur then the package that’s having issues is not there. So if jsx-requirejs-plugin is having issues it will not be in the targetDir but requirejs-text will.

bower.json

{
  "name": "drinking-buddy",
  "dependencies": {
    "backbone":             "~> 1.1.0",
    "backbone-relational":  "~> 0.8.0",
    "bootstrap":            "~> 3.2.0",
    "chance":               "~> 0.5.0",
    "font-awesome":         "~> 4.1.0",
    "ionicons":             "~> 1.5.0",
    "jQuery-Mask-Plugin":   "~> 1.6.0",
    "jsx-requirejs-plugin": "~> 0.3.0",
    "react":                "~> 0.11.0",
    "requirejs":            "~> 2.1.0",
    "requirejs-text":       "~> 2.0.0",
    "underscore":           "~> 1.6.0"
  }
}

Gruntfile.js

module.exports = function(grunt) {
  grunt.loadNpmTasks('grunt-bower-task');

  grunt.initConfig({
    bower: {
      install: {
        options: {
          targetDir: './vendor/assets/components',
          verbose: true
        }
      }
    }
  });
}

package.json

{
  "name": "***",
  "version": "1.0.0",
  "dependencies": {
    "bower": "~> 1.3.0"
  },
  "devDependencies": {
    "grunt": "^0.4.5",
    "grunt-bower-task": "^0.4.0",
    "grunt-cli": "^0.1.13",
    "grunt-contrib-requirejs": "~> 0.4.0"
  },
  "engines": {
    "node": "0.10.x",
    "npm": "1.4.x"
  },
  "scripts": {
    "postinstall": "./node_modules/.bin/grunt bower:install"
  }
}

.bowerrc

{
  "directory": "vendor/assets/components"
}

Log Output

bower cached git://github.com/jashkenas/backbone.git#1.1.2
bower validate 1.1.2 against git://github.com/jashkenas/backbone.git#~> 1.1.0
bower cached git://github.com/PaulUithol/Backbone-relational.git#0.8.8
bower validate 0.8.8 against git://github.com/PaulUithol/Backbone-relational.git#~> 0.8.0
bower cached git://github.com/victorquinn/chancejs.git#0.5.6
bower validate 0.5.6 against git://github.com/victorquinn/chancejs.git#~> 0.5.0
bower cached git://github.com/FortAwesome/Font-Awesome.git#4.1.0
bower validate 4.1.0 against git://github.com/FortAwesome/Font-Awesome.git#~> 4.1.0
bower cached git://github.com/twbs/bootstrap.git#3.2.0
bower validate 3.2.0 against git://github.com/twbs/bootstrap.git#~> 3.2.0
bower cached git://github.com/philix/jsx-requirejs-plugin.git#0.3.0
bower validate 0.3.0 against git://github.com/philix/jsx-requirejs-plugin.git#~> 0.3.0
bower cached git://github.com/driftyco/ionicons.git#1.5.2
bower validate 1.5.2 against git://github.com/driftyco/ionicons.git#~> 1.5.0
bower cached git://github.com/jrburke/requirejs-bower.git#2.1.14
bower validate 2.1.14 against git://github.com/jrburke/requirejs-bower.git#~> 2.1.0
bower cached git://github.com/igorescobar/jQuery-Mask-Plugin.git#1.6.5
bower validate 1.6.5 against git://github.com/igorescobar/jQuery-Mask-Plugin.git#~> 1.6.0
bower cached git://github.com/facebook/react-bower.git#0.11.1
bower validate 0.11.1 against git://github.com/facebook/react-bower.git#~> 0.11.0
bower cached git://github.com/jashkenas/underscore.git#1.6.0
bower validate 1.6.0 against git://github.com/jashkenas/underscore.git#~> 1.6.0
bower cached git://github.com/requirejs/text.git#2.0.12
bower validate 2.0.12 against git://github.com/requirejs/text.git#~> 2.0.0
bower cached git://github.com/jashkenas/backbone.git#1.1.2
bower validate 1.1.2 against git://github.com/jashkenas/backbone.git#>=1.1.2
bower cached git://github.com/jashkenas/underscore.git#1.7.0
bower validate 1.7.0 against git://github.com/jashkenas/underscore.git#>=1.5.0
bower cached git://github.com/jquery/jquery.git#2.1.1
bower validate 2.1.1 against git://github.com/jquery/jquery.git#>= 1.9.0
bower install jsx-requirejs-plugin#0.3.0
bower install requirejs-text#2.0.12
bower install requirejs#2.1.14
bower install ionicons#1.5.2
bower install react#0.11.1
bower install jQuery-Mask-Plugin#1.6.5
bower install chance#0.5.6
bower install backbone-relational#0.8.8
bower install font-awesome#4.1.0
bower install underscore#1.6.0
bower install backbone#1.1.2
bower install bootstrap#3.2.0
bower install jquery#2.1.1
>> Installed bower packages
grunt-bower copying vendor/assets/components/backbone-relational/backbone-relational.js -> vendor/assets/components/backbone-relational/backbone-relational.js
grunt-bower copying vendor/assets/components/backbone/backbone.js -> vendor/assets/components/backbone/backbone.js
grunt-bower copying vendor/assets/components/chance/chance.js -> vendor/assets/components/chance/chance.js
grunt-bower copying vendor/assets/components/bootstrap/less/bootstrap.less -> vendor/assets/components/bootstrap/bootstrap.less
grunt-bower copying vendor/assets/components/bootstrap/dist/css/bootstrap.css -> vendor/assets/components/bootstrap/bootstrap.css
grunt-bower copying vendor/assets/components/bootstrap/dist/js/bootstrap.js -> vendor/assets/components/bootstrap/bootstrap.js
grunt-bower copying vendor/assets/components/bootstrap/dist/fonts/glyphicons-halflings-regular.eot -> vendor/assets/components/bootstrap/glyphicons-halflings-regular.eot
grunt-bower copying vendor/assets/components/bootstrap/dist/fonts/glyphicons-halflings-regular.svg -> vendor/assets/components/bootstrap/glyphicons-halflings-regular.svg
grunt-bower copying vendor/assets/components/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf -> vendor/assets/components/bootstrap/glyphicons-halflings-regular.ttf
grunt-bower copying vendor/assets/components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff -> vendor/assets/components/bootstrap/glyphicons-halflings-regular.woff
grunt-bower copying vendor/assets/components/font-awesome/css/font-awesome.css -> vendor/assets/components/font-awesome/font-awesome.css
grunt-bower copying vendor/assets/components/font-awesome/fonts/FontAwesome.otf -> vendor/assets/components/font-awesome/FontAwesome.otf
grunt-bower copying vendor/assets/components/font-awesome/fonts/fontawesome-webfont.eot -> vendor/assets/components/font-awesome/fontawesome-webfont.eot
grunt-bower copying vendor/assets/components/font-awesome/fonts/fontawesome-webfont.svg -> vendor/assets/components/font-awesome/fontawesome-webfont.svg
grunt-bower copying vendor/assets/components/font-awesome/fonts/fontawesome-webfont.ttf -> vendor/assets/components/font-awesome/fontawesome-webfont.ttf
grunt-bower copying vendor/assets/components/font-awesome/fonts/fontawesome-webfont.woff -> vendor/assets/components/font-awesome/fontawesome-webfont.woff
grunt-bower copying vendor/assets/components/ionicons/css/ionicons.css -> vendor/assets/components/ionicons/ionicons.css
grunt-bower copying vendor/assets/components/ionicons/fonts/ionicons.eot -> vendor/assets/components/ionicons/ionicons.eot
grunt-bower copying vendor/assets/components/ionicons/fonts/ionicons.svg -> vendor/assets/components/ionicons/ionicons.svg
grunt-bower copying vendor/assets/components/ionicons/fonts/ionicons.ttf -> vendor/assets/components/ionicons/ionicons.ttf
grunt-bower copying vendor/assets/components/ionicons/fonts/ionicons.woff -> vendor/assets/components/ionicons/ionicons.woff
grunt-bower copying vendor/assets/components/jQuery-Mask-Plugin/jquery.mask.min.js -> vendor/assets/components/jQuery-Mask-Plugin/jquery.mask.min.js
grunt-bower copying vendor/assets/components/jquery/dist/jquery.js -> vendor/assets/components/jquery/jquery.js
Fatal error: ENOENT, no such file or directory 'vendor/assets/components/jsx-requirejs-plugin'

Issue Analytics

  • State:open
  • Created 9 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
Zensavonacommented, Sep 11, 2014

hey @anthonator just FYI I have a fix for this:

in your Gruntfile.js underneath targetDir and verbose add another property called copy and set it to false (it’s true by default). This makes the issue go away 😄

Your Gruntfile.js should look like this:

module.exports = function(grunt) {
  grunt.loadNpmTasks('grunt-bower-task');

  grunt.initConfig({
    bower: {
      install: {
        options: {
          targetDir: './vendor/assets/components',
          verbose: true,
          copy: false
        }
      }
    }
  });
}

enjoy ❤️

0reactions
TroodoNmikecommented, May 2, 2015

I have similar problem. It removes my last package for no reason. Manual bower install has no problem with it. The solution suggested Zesenova by adding copy: false works for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Install and Correct Dependencies Issues in Ubuntu
Option 8: Use the Build-dep Command. Using this subcommand, we can install all the dependencies for 'softwarename'. Then, we can try to ...
Read more >
Fix: Couldn't install dependency error | Valorant Guide
Want to play Valorant, but receiving an error about needing to contact support to fix a dependency error ? Well, this video covers...
Read more >
Installing dependencies | Yarn
yarn install is used to install all dependencies for a project. The dependencies are retrieved from your project's package.json file, and stored in...
Read more >
NPM doesn't install module dependencies - Stack Overflow
I had an issue where manually installing a package had created a package-lock.json file after updating to node 8.0.0 and npm 5.0.0. After...
Read more >
npm install not installing dependencies listed in package.json ...
I'm opening this issue because: npm is crashing. npm is producing an incorrect install. npm is doing something I don't understand.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found