views:

83

answers:

2

When I try to deploy .js files as part of a feature, not in the _layouts directory I get the following error:

Cannot make a cache safe URL for 'myfile.js'

Any suggestions appreciated.

A: 

We place our .js files under Style Library for a given site collection. We got our solution template from a consultant so I'm not comfortable sharing the files/details on the Internet, but provisionfiles.xml (element manifest) has the .js files listed under the CSSFiles module.

EDIT: Googling for this information is difficult. I found that (module RootWebOnly) and (module cssfiles RootWebOnly) return decent results.

Mayo
A: 

Within your feature folder (under 12/template/features); check elements.xml; and make sure the js file is being deployed to \12\TEMPLATE\LAYOUTS

Gurdas Nijor
You should create a custom folder under layouts in which to place your files as well.
Kirk Liemohn
@Kirk: obviously
Gurdas Nijor