Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: ENOENT: no such file or directory #18

Open
aimad-majdou opened this issue Nov 2, 2017 · 10 comments
Open

Error: ENOENT: no such file or directory #18

aimad-majdou opened this issue Nov 2, 2017 · 10 comments

Comments

@aimad-majdou
Copy link

aimad-majdou commented Nov 2, 2017

Running bower-away will result this error :

Error: ENOENT: no such file or directory, open 'C:\Dev\Workspace\ABC\webapps\rhweb\src\main\webapp\bower_components\bower_components.7z\.bower.json'
    at Object.fs.openSync (fs.js:648:18)
    at Object.fs.readFileSync (fs.js:553:33)
    at _callee$ (C:\Users\aimad.majdou\AppData\Local\Yarn\config\global\node_modules\bower-away\cli.js:99:40)
    at tryCatch (C:\Users\aimad.majdou\AppData\Local\Yarn\config\global\node_modules\regenerator-runtime\runtime.js:65:40)
    at Generator.invoke [as _invoke] (C:\Users\aimad.majdou\AppData\Local\Yarn\config\global\node_modules\regenerator-runtime\runtime.js:299:22)
    at Generator.prototype.(anonymous function) [as next] (C:\Users\aimad.majdou\AppData\Local\Yarn\config\global\node_modules\regenerator-runtime\runtime.js:117:21)
    at step (C:\Users\aimad.majdou\AppData\Local\Yarn\config\global\node_modules\bower-away\cli.js:253:30)
    at _next (C:\Users\aimad.majdou\AppData\Local\Yarn\config\global\node_modules\bower-away\cli.js:268:9)
    at C:\Users\aimad.majdou\AppData\Local\Yarn\config\global\node_modules\bower-away\cli.js:275:7
    at new Promise (<anonymous>)
@sheerun
Copy link
Owner

sheerun commented Nov 3, 2017

please post your bower.json

@aimad-majdou
Copy link
Author

@sheerun this is my bower.json file :

{
	"name": "abweb",
	"version": "0.0.1",
	"description": "AB Web front end",
	"authors": [
	"ABC"
  ],
	"license": "Commercial",
	"homepage": "http://www.abc.fr/",
	"appPath": "src/main/webapp",
	"testPath": "src/test/javascript/spec",
	"dependencies": {
		"angular": "1.5.11",
		"angular-sanitize": "1.5.11",
		"angular-animate": "1.5.11",
		"angular-messages": "1.5.11",
		"modernizr": "2.8.3",
		"jquery": "~2.1.0",
		"es6-shim": "0.35.1",
		"extras.angular.plus": "0.9.3",
		"angular-material": "1.0.5",
		"angular-aria": "1.5.3",
		"ag-grid-enterprise": "5.0.3",
		"angular-moment": "1.0.1",
		"angular-file-upload": "1.1.5",
		"angular-ui-calendar": "1.0.1",
		"event-source-polyfill": "0.0.6",
		"toastr": "2.1.2",
		"angular-hotkeys": "chieffancypants/angular-hotkeys#~1.6.0",
		"AngularGM": "1.0.2",
		"backbone": "1.2.1",
		"joint": "0.9.6",
		"moment-duration-format": "1.3.0",
		"ngletteravatar": "~4.0.0",
		"vis": "4.18.1",
		"angular-dragdrop": "1.0.13",
		"jqueryui-touch-punch": "latest",
		"ng-scrollbars": "0.0.10",
		"Snap.svg": "snap.svg#^0.4.1",
		"angular-notification-icons": "latest",
		"angular-chart.js": "^0.10.2",
		"angular-feeds": "0.0.4",
		"jquery-textarea-highlighter": "0.6.8",
		"angularPrint": "0.3.8",
		"jquery-powertip": "https://github.com/stevenbenner/jquery-powertip/releases/download/v1.3.0/jquery.powertip-1.3.0.zip",
		"textAngular": "1.5.13",
		"jstree": "^3.3.4"
	},
	"devDependencies": {
		"angular-mocks": "1.5.11",
		"angular-scenario": "1.5.11"
	},
	"resolutions": {
		"angular": "1.5.11",
		"jquery": "~2.1.0",
		"angular-sanitize": "1.5.11",
		"es5-shim": "~2.1.0"
	},
	"ignore": [
	"node_modules/**",
	"**/node_modules",
	".settings/**",
	"src/test/**",
	"target/**",
	"src/main/resources/**"
  ]
}



@sheerun
Copy link
Owner

sheerun commented Nov 3, 2017

I don't see bower_components.7z there that produces the error

@aimad-majdou
Copy link
Author

@sheerun yes indeed, I don't know why I'm getting this error

@sheerun
Copy link
Owner

sheerun commented Nov 3, 2017

it's because you have bower_components.7z in your bower_components. it shoudn't be there

@shawnwildermuth
Copy link

Does this assume that .bowerrc isn't pointing at another directory? That seemed to be my problem.

@mfurlend
Copy link

mfurlend commented Dec 4, 2017

I have the same issue. Here is my bower.json:

{
  "name": "Something something",
  "version": "1.0.1",
  "authors": [
    "Mike Furlender <furlender@somethingsomething.com>"
  ],
  "license": "UNLICENSED",
  "homepage": "somethingsomething.com",
  "ignore": [
    "**/.*",
    "node_modules",
    "bower_components",
    "test",
    "tests"
  ],
  "dependencies": {
    "slick-carousel": "^1.6.0",
    "exif-js": "~2.1.1",
    "image-picker": "rvera/image-picker#~0.2.4",
    "hint.css": "^2.3.1",
    "holdon.js": "sdkcarlos/HoldOn.js",
    "css-toggle-switch": "^4.0.2",
    "d3": "~3.5.17",
    "leaflet-search": "^1.9.8",
    "rivets": "#latest",
    "chartist": "^0.9.8",
    "bootstrap": "^3.3.7",
    "modernizer": "^2.8.2",
    "chartist-plugin-legend": "mfurlend/chartist-plugin-legend#^0.3.1",
    "leaflet-bootstrap-zoom": "mad-gooze/Leaflet.BootstrapZoom#latest",
    "leaflet-markercluster": "Leaflet/Leaflet.markercluster#v1.0.0-beta.2.0",
    "dcjs": "dc.js#^1.7.5",
    "chosen-bootstrap-theme": "^1.0.0",
    "bootstrap-datepicker": "bootstrap-3-datepicker#^1.6.1",
    "sticky-element": "#latest" ,
    "js-cookie": "^2.1.2",
    "jquery.payment": "^1.4.3",
    "bootstrap-switch": "^3.3.2",
    "bootstrap-sass": "^3.3.7",
    "bootswatch": "v3.3.6+2",
    "remarkable-bootstrap-notify": "^3.1.3",
    "knockout": "^3.4.0",
    "cleave.js": "~0.5.1",
    "bootstrap-select": "^1.10.0",
    "font-awesome": "^4.6.3",
    "jquery": "^3.1.0",
    "Tocca.js": "^1.0.1",
    "d3-plugins": "somethingsomething/d3-plugins",
    "jwplayer": "somethingsomething/jwplayer",
    "topojson": "^1.6.26",
    "fancybox": "^2.1.5",
    "bootbox.js": "bootbox#^4.4.0",
    "moment": "^2.14.1",
    "bugsnag": "^3.0.2",
    "flexibility": "^2.0.1",
    "fastclick": "^1.0.6",
    "ckeditor": "#full/latest",
    "pastefromexcel": "devlog/pastefromexcel",
    "ckeditor-dev": "^4.5.10",
    "ckeditor-markdown-plugin": "*",
    "ckeditor_imagesizerestrict": "somethingsomething/ckeditor_imagesizerestrict",
    "jquery-migrate": "^3.0.0",
    "jquery.rcrumbs": "somethingsomething/jquery.rcrumbs",
    "html5shiv": "^3.7.3",
    "selectivizr": "^1.0.2",
    "css3-mediaqueries-js": "^1.0.0",
    "respond": "^1.4.2",
    "wow": "^1.1.2",
    "better-dateinput-polyfill": "^2.0.0",
    "filament-tablesaw": "tablesaw#^2.0.3"
  },
  "devDependencies": {
    "Croppie": "croppie#^2.3.0",
    "helium": "helium-css#*"
  },
  "resolutions": {
    "d3": "~4.1.1",
    "jquery": "^3.1.0",
    "ckeditor": "full/latest"
  },
  "scripts": {
    "postinstall": "../bower-postinstall.sh"
  }    

}

and my .bowerrc:

{
  "directory": "vendor",
  "cwd": "./",
  "scripts": {
    "postinstall": "../bower-postinstall.zsh"
  }
}

Error:
Error: ENOTDIR: not a directory, open '/Users/furlender/gitstore/public/vendor/.gitignore/.bower.json'

@sheerun
Copy link
Owner

sheerun commented Dec 6, 2017

Pull request fixing this issue will be welcome

@alaxalves
Copy link

I removed the references in my .bowerrc and it worked!!

@JustPya
Copy link

JustPya commented Jul 19, 2021

I have been migrating from bower to yarn for 3 days now, in my case working on a project with PHP symfony framework, where I need the node_modules be in web\js\components I've been strugulling a lot.

Right now I did already bower-away several times and all the dependencies have been intalled with Yarn in web\js\components@bower_components I get the next error:

ENOENT: no such file or directory, open 'C:\xxx\xxx\web\js\components\@bower_components\.bower.json' at Object.openSync (fs.js:476:3) at Object.readFileSync (fs.js:377:35) at _callee$ (C:\Users\xuserx\AppData\Roaming\npm\node_modules\bower-away\cli.js:99:40) at tryCatch (C:\Users\xuserx\AppData\Roaming\npm\node_modules\bower-away\node_modules\regenerator-runtime\runtime.js:62:40)

bower.json:

  "name": "xxx",
  "description": "",
  "license": "private all rights reserved",
  "private": true,
  "dependencies": {
    "angular": "~1.5",
    "angular-formly": "~0.0.14",
    "angular-animate": "~1.5",
    "angular-bootstrap": "1.1.2",
    "angular-float-thead": "~0.0.1",
    "angular-bootstrap-toggle": "*",
    "angular-google-chart": "~0.0.11",
    "angular-hammer": "~1.0.3",
    "angular-hotkeys": "chieffancypants/angular-hotkeys#~1.4.5",
    "angular-i18n": "~1.5",
    "angular-loading-bar": ">=0.4.1",
    "angular-messages": "~1.5",
    "angular-motion": "~0.3",
    "angular-resource": "~1.5",
    "angular-restmod": "~1.1.7",
    "angular-sanitize": "~1.5",
    "angular-strap": "^2.3.12",
    "angular-translate": "2.0.1",
    "angular-translate-loader-partial": "2.0.0",
    "angular-ui-calendar": "latest",
    "angular-ui-codemirror": "~0.3.0",
    "angular-ui-grid": "latest",
    "angular-ui-router": "<1.x",
    "angular-ui-slider": "~0.1.3",
    "angular-ui-utils": "bower-jq",
    "angular-ui-select": "^0.19.6",
    "angular-xeditable": "~0.1.8",
    "angularjs-nvd3-directives": "*",
    "angular-multi-select-tree": "*",
    "bootstrap": "3.3.4",
    "bootstrap4": "4.4.1",
    "bootstrap-additions": ">=0.2.2",
    "bootstrap-css": ">=3.1.1",
    "bootstrap-tabdrop": ">=1.0.0",
    "bootstrap-toggle": ">=2.2.2",
    "checklist-model": "~0.1.3",
    "codemirror": "~5.59.2",
    "d3": ">=3.4.6",
    "ez-plus": "~1.1.14",
    "floatThead": "~1.2.11",
    "font-awesome": "4.7.0",
    "hammerjs": ">=1.1.2",
    "handsontable": "~0.10.5",
    "iCheck": "~1.0.2",
    "iframe-resizer": "*",
    "jquery": "~2.2.4",
    "jquery-legacy": "jquery#1.x",
    "jquery-notific8": "~2.3.1",
    "jquery.easy-pie-chart": "~2.1.4",
    "jQuery.mmenu": "FrDH/jQuery.mmenu#4.2.7",
    "jquery.sparkline": "http://omnipotent.net/jquery.sparkline/latest/jquery.sparkline.js",
    "jquery-file-download": "*",
    "l.js": "~0.1.0",
    "mailcheck": "1.1.0",
    "moment": ">=2.10.7",
    "moment-timezone": "*",
    "ng-file-upload": "~4.2.1",
    "ng-file-upload-shim": "~4.2.1",
    "ng-idle": "0.3.5",
    "ng-sortable": "=1.1.9",
    "ng-table": "1.0.0-beta.6",
    "ng-table-export": "*",
    "ng-tags-input": "~2.1.0",
    "ngmap": "~1.16.7",
    "raphael": ">=2.1.2",
    "yamm3": "~1.0.0",
    "rrssb": "~1.8.6",
    "masonry": "~4",
    "imagesloaded": "~3.2.0",
    "ng-ckeditor": "esvit/ng-ckeditor#master",
    "angular-ui-tree": "~2.22.6",
    "jssor-slider": "~21.1.5",
    "webcamjs": "~1.0.4",
    "angular-google-places-autocomplete": "~0.2.7",
    "ng-password-strength": "~0.2.1",
    "bootstrap-ui-datetime-picker": "~2.2.0",
    "nanogallery": "~5",
    "angular-daterangepicker": "^0.2.2",
    "angular-moment": "^1.0.1",
    "angularjs-slider": "^6.2.2",
    "three-state-checkbox": "^1.1.0",
    "selectize": "^0.12.6",
    "angular-selectize2": "*",
    "lazysizes": "^4.1.4",
    "caman": "4.*",
    "scrollreveal": "*",
    "js-video-url-parser": "*",
    "firebase": "^7.16.1"
  },
  "version": "2.5",
  "ignore": [
    "**/.*",
    "node_modules",
    "bower_components",
    "web/js/components",
    "test",
    "tests"
  ],
  "resolutions": {
    "d3": ">=3.4.6",
    "angular": "~1.5",
    "jquery": "2.2.4",
    "moment": ">=2.10.7"
  }
}

.bowerrc


{
  "directory": "web/js/components"
}

After running bower-away serveral times el package.json:

  "name": "xxx",
  "version": "1.0.0",
  "main": "index.js",
  "private": true,
  "dependencies": {
    "@bower_components/angular": "angular/bower-angular#1.5.11",
    "@bower_components/angular-animate": "angular/bower-angular-animate#~1.5",
    "@bower_components/angular-bootstrap": "angular-ui/bootstrap-bower#1.1.2",
    "@bower_components/angular-bootstrap-toggle": "ziscloud/angular-bootstrap-toggle#*",
    "@bower_components/angular-daterangepicker": "fragaria/angular-daterangepicker#^0.2.2",
    "@bower_components/angular-float-thead": "brandon-barker/angular-floatThead#~0.0.1",
    "@bower_components/angular-formly": "formly-js/angular-formly#~0.0.14",
    "@bower_components/angular-google-chart": "angular-google-chart/angular-google-chart#~0.0.11",
    "@bower_components/angular-google-places-autocomplete": "kuhnza/angular-google-places-autocomplete#~0.2.7",
    "@bower_components/angular-hammer": "monospaced/angular-hammer#~1.0.3",
    "@bower_components/angular-hotkeys": "chieffancypants/angular-hotkeys#~1.4.5",
    "@bower_components/angular-i18n": "angular/bower-angular-i18n#~1.5",
    "@bower_components/angular-inflector": "iobaixas/angular-inflector#~0.2.0",
    "@bower_components/angular-loading-bar": "chieffancypants/angular-loading-bar#>=0.4.1",
    "@bower_components/angular-messages": "angular/bower-angular-messages#~1.5",
    "@bower_components/angular-moment": "urish/angular-moment#^1.0.1",
    "@bower_components/angular-motion": "mgcrea/angular-motion#~0.3",
    "@bower_components/angular-multi-select-tree": "a5hik/angular-multi-select-tree#*",
    "@bower_components/angular-resource": "angular/bower-angular-resource#~1.5",
    "@bower_components/angular-restmod": "platanus/angular-restmod#~1.1.7",
    "@bower_components/angular-sanitize": "angular/bower-angular-sanitize#~1.5",
    "@bower_components/angular-selectize2": "machineboy2045/angular-selectize#*",
    "@bower_components/angular-strap": "mgcrea/angular-strap#^2.3.12",
    "@bower_components/angular-translate": "PascalPrecht/bower-angular-translate#2.0.1",
    "@bower_components/angular-translate-loader-partial": "PascalPrecht/bower-angular-translate-loader-partial#2.0.0",
    "@bower_components/angular-ui-calendar": "angular-ui/ui-calendar#*",
    "@bower_components/angular-ui-codemirror": "angular-ui/ui-codemirror#~0.3.0",
    "@bower_components/angular-ui-grid": "angular-ui/bower-ui-grid#*",
    "@bower_components/angular-ui-router": "angular-ui/angular-ui-router-bower#<1.x",
    "@bower_components/angular-ui-select": "angular-ui/ui-select#^0.19.6",
    "@bower_components/angular-ui-slider": "angular-ui/ui-slider#~0.1.3",
    "@bower_components/angular-ui-tree": "JimLiu/angular-ui-tree#~2.22.6",
    "@bower_components/angular-ui-utils": "angular-ui/ui-utils#bower-jq",
    "@bower_components/angular-xeditable": "vitalets/angular-xeditable#~0.1.8",
    "@bower_components/angularjs-nvd3-directives": "cmaurer/angularjs-nvd3-directives#*",
    "@bower_components/angularjs-slider": "rzajac/angularjs-slider#^6.2.2",
    "@bower_components/bootstrap": "twbs/bootstrap#3.3.4",
    "@bower_components/bootstrap-additions": "mgcrea/bootstrap-additions#>=0.2.2",
    "@bower_components/bootstrap-css": "jozefizso/bower-bootstrap-css#>=3.1.1",
    "@bower_components/bootstrap-css-only": "fyockm/bootstrap-css-only#~3.2.0",
    "@bower_components/bootstrap-daterangepicker": "dangrossman/bootstrap-daterangepicker#^2.0.0",
    "@bower_components/bootstrap-tabdrop": "nwhite89/bootstrap-tabdrop#>=1.0.0",
    "@bower_components/bootstrap-toggle": "minhur/bootstrap-toggle#>=2.2.2",
    "@bower_components/bootstrap-ui-datetime-picker": "gillardo/bootstrap-ui-datetime-picker#~2.2.0",
    "@bower_components/bootstrap4": "twbs/bootstrap#4.4.1",
    "@bower_components/caman": "meltingice/CamanJS#4.*",
    "@bower_components/checklist-model": "vitalets/checklist-model#~0.1.3",
    "@bower_components/ckeditor": "ckeditor/ckeditor-releases#^4.4.0",
    "@bower_components/codemirror": "components/codemirror#~5.59.2",
    "@bower_components/d3": "mbostock-bower/d3-bower#~3.4.1",
    "@bower_components/desandro-matches-selector": "desandro/matches-selector#^2.0.0",
    "@bower_components/ev-emitter": "metafizzy/ev-emitter#^1.0.0",
    "@bower_components/eve-raphael": "tomasAlabes/eve#0.5.0",
    "@bower_components/eventEmitter": "Olical/EventEmitter#>=4.2 <5.0",
    "@bower_components/eventie": "desandro/eventie#~1.0.4",
    "@bower_components/ez-plus": "igorlino/elevatezoom-plus#~1.1.14",
    "@bower_components/firebase": "firebase/firebase-bower#^7.16.1",
    "@bower_components/fizzy-ui-utils": "metafizzy/fizzy-ui-utils#^2.0.0",
    "@bower_components/floatThead": "mkoryak/floatThead#~1.2.11",
    "@bower_components/font-awesome": "FortAwesome/Font-Awesome#4.7.0",
    "@bower_components/fullcalendar": "fullcalendar/fullcalendar#~2.7.1",
    "@bower_components/get-size": "desandro/get-size#^2.0.2",
    "@bower_components/hammerjs": "EightMedia/hammer.js#>=1.1.2",
    "@bower_components/handsontable": "handsontable/handsontable#~0.10.5",
    "@bower_components/iCheck": "fronteed/iCheck#~1.0.2",
    "@bower_components/iframe-resizer": "davidjbradshaw/iframe-resizer#*",
    "@bower_components/imagesloaded": "desandro/imagesloaded#~3.2.0",
    "@bower_components/jquery": "jquery/jquery-dist#~2.2.4",
    "@bower_components/jquery-file-download": "johnculviner/jquery.fileDownload#*",
    "@bower_components/jquery-legacy": "jquery/jquery-dist#1.x",
    "@bower_components/jquery-notific8": "willsteinmetz/jquery-notific8#~2.3.1",
    "@bower_components/jquery-ui": "components/jqueryui#~1.10.x",
    "@bower_components/jquery.easy-pie-chart": "rendro/easy-pie-chart#~2.1.4",
    "@bower_components/jQuery.mmenu": "FrDH/jQuery.mmenu#4.2.7",
    "@bower_components/js-video-url-parser": "Zod-/jsVideoUrlParser#*",
    "@bower_components/jssor-slider": "jssor/jquery-slider#~21.1.5",
    "@bower_components/l.js": "malko/l.js#~0.1.0",
    "@bower_components/lazysizes": "aFarkas/lazysizes#^4.1.4",
    "@bower_components/lodash": "lodash/lodash#^3.0.1",
    "@bower_components/mailcheck": "mailcheck/mailcheck#1.1.0",
    "@bower_components/masonry": "desandro/masonry#~4",
    "@bower_components/microplugin": "brianreavis/microplugin.js#0.0.x",
    "@bower_components/moment": "moment/moment#>=2.10.7",
    "@bower_components/moment-timezone": "moment/moment-timezone#*",
    "@bower_components/nanogallery": "Kris-B/nanoGALLERY#~5",
    "@bower_components/ng-ckeditor": "esvit/ng-ckeditor#master",
    "@bower_components/ng-file-upload": "danialfarid/angular-file-upload-bower#~4.2.1",
    "@bower_components/ng-file-upload-shim": "danialfarid/angular-file-upload-shim-bower#~4.2.1",
    "@bower_components/ng-idle": "HackedByChinese/ng-idle#0.3.5",
    "@bower_components/ng-password-strength": "subarroca/ng-password-strength#~0.2.1",
    "@bower_components/ng-sortable": "a5hik/ng-sortable#=1.1.9",
    "@bower_components/ng-table": "esvit/ng-table#1.0.0-beta.6",
    "@bower_components/ng-table-export": "esvit/ng-table-export#*",
    "@bower_components/ng-tags-input": "mbenford/ngTagsInput-bower#~2.1.0",
    "@bower_components/ngmap": "allenhwkim/angularjs-google-maps#~1.16.7",
    "@bower_components/nvd3": "novus/nvd3#~v1.1.15-beta",
    "@bower_components/outlayer": "metafizzy/outlayer#^2.1.0",
    "@bower_components/raphael": "DmitryBaranovskiy/raphael#>=2.1.2",
    "@bower_components/requirejs": "jrburke/requirejs-bower#~2.1.10",
    "@bower_components/rrssb": "kni-labs/rrssb#~1.8.6",
    "@bower_components/scrollreveal": "jlmakes/scrollreveal.js#*",
    "@bower_components/selectize": "selectize/selectize.js#^0.12.6",
    "@bower_components/sifter": "brianreavis/sifter.js#0.5.x",
    "@bower_components/three-state-checkbox": "antontemchenko/three-state-checkbox#^1.1.0",
    "@bower_components/webcamjs": "jhuckaby/webcamjs#~1.0.4",
    "@bower_components/yamm3": "geedmo/yamm3#~1.0.0"
  },
  "engines": {
    "yarn": ">= 1.0.0"
  },
  "scripts": {
    "postinstall": "node -e \"try { require('fs').symlinkSync(require('path').resolve('node_modules/@bower_components'), 'web\\js\\components', 'junction') } catch (e) { }\""
  }
}```
   
   
   Thank you in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants