I build my nextjs app and then run yarn start,
I find there are a lot of 404 files.
I want to know what are these files and how can I remove these files,
There are two ways to solve this problem
1.<Link href='posts/0' prefetch={false}/>
2.Change <Link href='posts/0'/>to <Link href='posts/[page]' as='posts/0'/>
reference:
https://nextjs.org/docs/api-reference/next/link
Next.js 404 error for all preloaded links
thanks George!
Related
I tried loading qunit js from both tests.html and through require, but irrespective of how I load qunit, when I run grunt task to run qunit tests it is failing tests with timeout and in the error it states qunit.js is not found in the same folder where my tests.html is present. I am able to overcome this issue by simply copying the qunit.js file. I don't want to keep qunit.js in this additional location, can you please share your thoughts why it is looking for qunit.js at this specific location.
Thanks
Sudhakar
Faced the same issue while setting up the QUnit workflow for my AMD Oracle JET project.
The reason for this seems to be the absence of the 'qunit' path in the requirejs configuration.
Adding this:
require.config({
...
paths: {
'qunit': 'path/to/your/qunit/js'
}
})
...and moving all the code in my data-main file to a <script></script> block within the <body> of index.html did the trick for me.
Hope this helps.
I tried to deploy an angular2-meteor project on meteor server.
The app works well locally. And I already did meteor reset before deploying.
Right now it shows a blank page and error:
EXCEPTION: No Directive annotation found on e
I also tried add https, but same error. What does this error mean? Or what can possibly cause this? Thanks
Please open this page and see Console for more error details.
UPDATE: log file I got using meteor logs xxx.
You should include -dev.js files (for example angular2.dev.js) for Angular2 so you'll be able to see more readable errors and especially on which class you have the problem...
<script src="node_modules/angular2/bundles/angular2-polyfills.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<script src="node_modules/rxjs/bundles/Rx.js"></script>
<script src="node_modules/angular2/bundles/angular2.dev.js"></script> <-----
<script src="node_modules/angular2/bundles/router.dev.js"></script> <-----
<script src="node_modules/angular2/bundles/http.dev.js"></script> <-----
Most of time, you have such error when providing something wrong in the directives attribute of a component. For example providers...
Now I found why it shows these errors.
If you met similar problems like these:
EXCEPTION: No Directive annotation found on e
Or
ngDoCheck is not a function when using minified bundles
They are all related with UglifyJS. Right now there is no good way to solve them.
Check here and here
I am trying to set up a website using Jekyll and GitHub Pages (first-timer), and most importantly, to style it with Bootstrap.
You can check what I have already done:
GitHub repository: https://github.com/thibaudclement/wallaby
GitHub page: http://thibaudclement.github.io/wallaby/ (check gh-pages branch)
Also, I followed this tutorial to import Bootstrap into the Jekyll structure.
Layouts and includes seem to work just fine, but I don't understand why my index.html does not get "styled" as it should, fetching information into the css/style.css file.
Any idea of what I am doing wrong?
Thanks.
The path to your css file is incorrect - it's not loading if you check your browser console
"Failed to load resource: the server responded with a status of 404 (Not Found) - http://thibaudclement.github.io/wallaby/style/site.css"
In _config.yml, you need to set baseurl: /wallaby.
And use {{ site.baseurl }} to load resources like this :
<link href="{{ site.baseurl }}/css/style.css" media="screen" rel="stylesheet" type="text/css" />.
See Jekyll documentation.
I've got very simple .WAR containing example servlet. I'm able to deploy it in servicemix using the following command:
osgi:install file:///home/seiho/apache-servicemix-4.4.2/deploy/TestServlet.war?Bundle-SymbolicName=TestServlet&Webapp-Context=/TestServlet
And then see it in my browser. But only with full path to a file, e.g.: localhost:8080/TestServlet/index.html or localhost:8080/TestServlet/TestServlet (my servlet is TestServlet class).
I'd like to launch the index.html page automatically after entering: localhost:8080/TestServlet
how to do it?
MORE IMPORTANT
I need a way to convert the .WAR file or servlet project (I've got the sources) so that new .WAR file can be auto-deployed by copying it to $SERVICEMIX_HOME/deploy directory.
I've tried editing the MANIFEST.MF file, but with no success. Probably I'm doing something wrong.
Thanks for any advice/help.
To be recognised as a wab, you need to add a context path header to your manifest:
Web-ContextPath: TestServlet
It's working now! I was doing my MANIFEST.MF according to this page: http://team.ops4j.org/wiki/display/ops4j/Pax+Web+Extender+-+War+-+OSGi-fy
The problem was that for some reason "Bundle-Version: 1.0" line was required as opposed to optional as stated on that page.
Honestly, just adding the Bundle-Version fix-it.
I knew it was something wrong with the MANIFEST.MF and after Holly Cummins' question I played with it a bit more. Thanks Holly.
I still can't do anything with the manual site launching (have to manually enter the index.html).
http://localhost:8080/TestServlet/ gives me this:
HTTP ERROR 404
Problem accessing /TestServlet/. Reason:
Not Found
Powered by Jetty://
http://localhost:8080/TestServlet/index.html gives me proper site.
CSS link:
<link rel="stylesheet" href="/site_media/style.css"
type="/text/css" />
I'm getting a -404 error while loading my CSS sheet.When I try to debug the location thru Firebug(Firefox), I get the below location.
"C:\Python27\Djangoprojects\django_bookmarks..\django_bookmarks\site_media\style.css" does not exist
Site_media is determined by the Python code in URLS.py
site_media = os.path.join(os.path.dirname(__file__), 'site_media')
Why do I get the ..\ in the location?