-
Notifications
You must be signed in to change notification settings - Fork 8
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
Avoiding 404s #27
Comments
The server-side topic comes up often. It's been very interesting to see how much we can do without it, but at some point we may collectively decide that we need a server-side helper. As employees of Pivotal's Frameworks and Runtimes group, we'd have to ensure that we have a solution for a Spring-based server-side helper, too.
I like this line of thinking. I've been thinking similarly, but via a rave cli. A cli could do a lot of things like this. I'd insist that the use of the rave cli be optional and that the dev could just use their favorite tools (npm + gulp or bower + grunt, for examples). The rave/debug module would help detect errors that devs might cause when not using the cli. |
I wonder if npm would accept a patch that creates a |
Interesting. Are you saying that npm would create some sort of app manifest file??? My experience with the npm folks tells me that they would not accept this kind of patch. :( Also, to be clear, I have been thinking that a rave cli would collect metadata in the bower.json and/or package.json files, not a new metadata file or app manifest. I'm open to awesome ideas, though. :) |
Well, I imagined Of course, such file could easily get out of sync since there might be other tools that touch node_modules, etc. Which is why I also think npm folks wouldn't be in favour of adding such a file with info that can be easily derived.
|
The 404s are caused by two things, atm, neither of which is caused by the node_modules heirarchy:
As it turns out, (2) is problematic since package.json typically points at node-specific dependencies. jspm looks for a "repository" field to decide whether the dependencies are found on npm or bower. The bower folks are also considering if/when to make bower.json mandatory in registered packages. I'm seriously thinking about removing that "feature". |
|
An example of where npm hierarchy 404s kick can be reproduced by installing
Loading rave then throws the following 404 And I assume that loading envify would fail for the same reason (atm this is not the best example, since loading envify fails due to missing node builtin But my main point is that the node_modules hierarchy will definitely become an issue (especially after calling npm dedupe?) |
Ah! I see you're actually looking up the node_modules hierarchy here https://github.com/RaveJS/rave/blob/master/lib/createVersionedIdTransform.js#L21-L23. Neat. Ignore my last message then. |
Well, actually, trying to fetch package.jsons for modules that live higher up in the node_modules is one of the reasons 404s are caused. And possibly it's something that could be slightly improved. |
I agree. this could probably be improved |
all of the current bower issues could be solved if .bower.json were accessible from the browser. here are some options to fix this:
I like option 1, but I'm not sure if we'll be successful. I know at least two of the bower committers will be open to the idea. |
Have you considered an optional server side component that could be started in the background that would provide the info about where all the modules are located which would avoid all of the 404s?
Alternatively, it could be a metadata file that's generated after npm install and placed at the root somewhere.
It kind of goes against rave's goal to remove machinery, but it could be optional.
The text was updated successfully, but these errors were encountered: