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

File not being served #197

Open
mturnwall opened this issue Oct 28, 2015 · 1 comment
Open

File not being served #197

mturnwall opened this issue Oct 28, 2015 · 1 comment

Comments

@mturnwall
Copy link

I have a task that is serving multiple directories. The files in one of the directories is not being served. The browser reports Cannot GET /.tmp/includes/jsbin/check_compat.js.

Here is my task.

dist: {
    options: {
        base: ['.tmp', '<%= config.dist %>'],
        open: {
            target: 'http://localhost:<%= connect.options.port %>?envMode=apiary&testing=true'
        }
    }
}

The files in the .tmp directory can't be found by the browser. If I set the base to just .tmp the page loads and I can browser that folder. When I add the second folder I get no such luck.

The .tmp folder holds my transpiled javascript files and the sourcemap points to the source files in this directory. So in my browser's dev tools I can see the directory of the source files, but when I click on a file it's empty. If I right click on the file and select "Open file in new tab" I get the error message Cannot GET /.tmp/includes/jsbin/check_compat.js.

Here is a list of files the browser shows in dev tools.

image

So I know that the sourcemap is working correctly. I've been trying to fix this for a few days now.

@mturnwall
Copy link
Author

I still ca't get this to work. Here is my current connect task.

server: {
    options: {
        base: ['app', '.tmp'],
        open: true
    }
}

.tmp holds my compiled css and javascript files. app is my main application folder. The index.html file is in app and it gets served just fine. All the compiled files in .tmp load as well. In dev tools for both Firefox and Chrome I see the link to the sass source file. If try to view the sass source files I get 404 errors.

Here is the debug from the server. The css folder is in the .tmp folder.

[D] server GET /css/master.css 304 - - 0.620 ms
[D] server GET /css/master.css.map 200 459 - 1.947 ms
[D] server GET /app/css/sass/_theme.scss 404 37 - 1.037 ms
[D] server GET /app/css/sass/modules/_module_rotator.scss 404 54 - 0.713 ms
[D] server GET /app/css/sass/master.scss 404 37 - 0.619 ms
[D] server GET /app/css/sass/_modulesMap.scss 404 42 - 0.981 ms

I'm having this issue across multiple projects.

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

1 participant