Where do webpack:// files live, and how are they generated? - css

I am very much a novice regarding the Node ecosystem, and my intention is to update my team's React/Typescript app from react-scripts 4.x to 5.x. I'm seeing an error which I don't understand (actually a warning, but CircleCI is failing b/c it's on strict mode) when I execute npx react-app-rewired build --aot --no-watch --no-progress:
static/css/main.109f02ad.css from Css Minimizer plugin
postcss-svgo:: Invalid character in tag name
> 1 | <svg+xmlns="http://www.w3.org/2000/svg"+width="1"+height="1"+viewBox="0+0+1+1"><…
| ^
webpack://./src/app/styles/genome-extraction-datatable.css:1:0
My app does have a styles/genome-extraction-datatable.css but the text svg and xmlns do not appear in it. So this webpack:// file must be generated ... but how?
Also, removing the source CSS file does not resolve the error. It complains about a different CSS file in that case.
Is this enough information to help me get started? Please let me know what additional information would be useful here. I know nothing about webpack.

Related

webpack loaders can't resolve some image files

I'm getting the following error:
ERROR in ./app/styles/index.scss (./node_modules/css-loader/dist/cjs.js??ref--12-1!./node_modules/resolve-url-loader??ref--12-2!./node_modules/sass-loader/lib/loader.js??ref--12-3!./app/styles/index.scss)
Module not found: Error: Can't resolve '../../images/global/univers/characters/border-universe-top.png' in '/home/wolf/app/styles'
# ./app/styles/index.scss (./node_modules/css-loader/dist/cjs.js??ref--12-1!./node_modules/resolve-url-loader??ref--12-2!./node_modules/sass-loader/lib/loader.js??ref--12-3!./app/styles/index.scss) 81:42-115
# ./app/styles/index.scss
# ./app/core/app.js
# multi ./node_modules/react-app-polyfill/ie11.js ./app/core/app.js
Now, the weird parts:
I made sure the path is correct
In that very same SCSS file, another image file is used through url(). This file is in the same directory as border-universe-top.png and is loaded just fine.
the two files are very similar (although it might not be relevant, they are both ~2kb)
I thought it might come from some webpack config options, but since some files are correctly resolved, I'm starting to winder if it might not come from something totally different.
Have you tried npm rebuild node-sass ?
I experienced this in the past and this resolved it.

Laravel 5.7: what is the meaning of Undefined index style(mix('/css/frontend.css'))?

I am new to Laravel and currently attempt to import vue to my Laravel project.
After I ran 'npm run dev' command and check a page built with blade layout which is downloaded from a boilerplate project, I see the error : Undefined index in style(mix('/css/frontend.css')). This css file exists in public/css.
This is the line that invokes this error.
{{ style(mix('/css/frontend.css')) }}
What is its meaning and how to fix it?
Also, I can't find the api documentation that tell the function of style() and mix().
If you know where the documentation is, please give me the link. Thanks!
Check webpack.mix.js to see if frontend.css is being compiled by Laravel Mix. If you don't see any reference to it, then you should reference the file in your Blade views with asset('/css/frontend.css') instead of mix().
mix() reads from public/mix-manifest.json to map your source filenames to their output name, which is useful when files are versioned for cache busting. A mix-manifest entry might look like this: "/css/app.css": "/css/app.css?id=7564ad125f69af0035c3". If your file wasn't compiled or copied with Laravel mix then it would not have an entry in mix-manifest.json, which would explain the undefined index error and why you need to use asset() instead.
Also, I don't know what style() is but it doesn't come with the Laravel framework.
Refs: https://laravel.com/docs/5.7/mix#versioning-and-cache-busting

Needing assistance in prepping for a Drupal Migration with Manifest.yml

I am attempting to make a migration from D7 to D8 using Migrate Manifest. I have all the migrate modules installed (i.e. the 3 core migrate modules, Migrate Upgrade, Migrate Plus, Migrate Tools and Migrate Manifest). I followed the directions at this link: https://www.drupal.org/node/2350651 to prepare my manifest file. This is the relevant part of my resulting yaml file (truncated for brevity):
- block_content_body_field
- block_content_entity_display
- block_content_entity_form_display
- block_content_type
- d7_block
- d7_custom_block
When I ran the migrate-manifest via Drush, as specified by the directions in the link above, I received an error declaring a parse error pointing to the first line in the yaml list. This is the exact error: Unable to parse at line 1 (near " - block_content_body_field").
I tried several debugging steps:
I checked a yaml linter to see whether my file was properly formatted. My file passed the test.
I moved the block migrations below the ones that are prefixed with a 'd7' to match the example in the link.
I attempted a piecemeal migration of a file from my list of migrations, it worked.
I tried to alter the spacing on the list items.
All these steps failed to resolve the issue I am seeing.
I am unsure what other debugging steps I should take. All the above failed to resolve my issue.
Any ideas would be appreciated.

convert .WAR for auto deploy in karaf/servicemix

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.

Compile error in empty cocos2d 2.0 (iPhone)

When I try to compile new cocos2d+box2d project in xcode4.
I got error message like:
/Users/bla-bla/Cocos2d testing/Cocos2d testing/libs/cocos2d/CCDirector.h:32:9: fatal error: 'kazmath/mat4.h' file not found [2]
/Users/bla-bla/Cocos2d testing/Cocos2d testing/libs/cocos2d/CCNode.h:37:9: fatal error: 'kazmath/kazmath.h' file not found [2]
File I checked, what is wrong?
This is caused by having a space in the path name to your project. To work around this, you'll need to add the following under your project's configuration... in Build Settings, in the group of Search Paths, set the Header Search Paths to the following value:
"${SRCROOT}/Cocos2d testing/libs/kazmath/include"
Be sure to include the double-quotes.
did you check in Finder to see if there is a real folder named kazmath in the same path as where CCNode is ? if not, there is probably a flaw in the templates install script for that version of coco. But dont rely on the 'tree view' of the Xcode project navigator to really know whether a file is present or not. If the path is wrong in the include, suggest you report it to the coco team. You could temporarily fix the import statements to get going, but that would be throw-away code :) when coco issues another release candidate, presumably fixed.
Ensure you are editing the right header search paths for the right target. 1 hour of my life wasted editing the main project or the app rather than the test!

Resources