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

bower_components/angular/angular.js 404 (Not Found) #28

Open
lackovic opened this issue Jun 23, 2018 · 2 comments
Open

bower_components/angular/angular.js 404 (Not Found) #28

lackovic opened this issue Jun 23, 2018 · 2 comments

Comments

@lackovic
Copy link

lackovic commented Jun 23, 2018

I used bower-away to migrate angular-seed from bower to yarn.

The project was successfully converted to Yarn.

I found all bower components in node_modules/@bower_components.

After running the http-server with:

yarn http-server -a localhost -p 8000 -c-1 ./app

When I open http://localhost:8000/ in a browser I get the following errors:

GET http://localhost:8000/bower_components/html5-boilerplate/dist/css/normalize.css 404 (Not Found)
GET http://localhost:8000/bower_components/html5-boilerplate/dist/css/main.css 404 (Not Found)
GET http://localhost:8000/bower_components/html5-boilerplate/dist/js/vendor/modernizr-2.8.3.min.js 404 (Not Found)
GET http://localhost:8000/bower_components/angular/angular.js 404 (Not Found)
GET http://localhost:8000/bower_components/angular-route/angular-route.js 404 (Not Found)
GET http://localhost:8000/bower_components/angular/angular.js 404 (Not Found)
GET http://localhost:8000/bower_components/angular-route/angular-route.js 404 (Not Found)

Here you can see the index.html

The bower_components once resided in app/bower_components but after the migration are located in node_modules\@bower_components

It looks like when running yarn install the postinstall script tries to create a symbolic link to node_modules/@bower_components in the app directory, but silently fails: no link is created and no error message is displayed.

postinstall script:

try {
    require('fs')
        .symlinkSync(require('path')
            .resolve('node_modules/@bower_components'), 'app\\bower_components', 'junction')
} catch (e) {}

I tried running yarn add file-system but that didn't fix the issue.

Full source code of the project can be found here.

Any idea how could I make it work?

@larissapissurno
Copy link

Same error here

@sheerun
Copy link
Owner

sheerun commented Feb 4, 2020

you can use ln -s to link bower_components to node_modules/@bower_components

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

3 participants