H5BP Build Script Issue - html5boilerplate

Every time I try to use HTML5 Build Script I get this errors:
-js.main.concat:
[echo] Concatenating Main JS scripts based on index.html...
[concat] /Volumes/[...]/intermediate/java.lang.NullPointerException does not exist.
[concat] /Volumes/[...]/intermediate/at does not exist.
[concat] /Volumes/[...]/intermediate/ScriptsToConcat.handleStartTag(ScriptsToConcat.java:38) does not exist.
[concat] /Volumes/[...]/intermediate/at does not exist.
[concat] /Volumes/[...]/intermediate/javax.swing.text.html.parser.DocumentParser.handleStartTag(DocumentParser.java:143) does not exist.
[concat] /Volumes/[...]/intermediate/at does not exist.
[concat] /Volumes/[...]/intermediate/javax.swing.text.html.parser.Parser.startTag(Parser.java:421) does not exist.
[concat] /Volumes/[...]/intermediate/at does not exist.
[concat] /Volumes/[...]/intermediate/javax.swing.text.html.parser.Parser.parseTag(Parser.java:1943) does not exist.
[concat] /Volumes/[...]/intermediate/at does not exist.
[concat] /Volumes/[...]/intermediate/javax.swing.text.html.parser.Parser.parseContent(Parser.java:2061) does not exist.
[concat] /Volumes/[...]/intermediate/at does not exist.
[concat] /Volumes/[...]/intermediate/javax.swing.text.html.parser.Parser.parse(Parser.java:2228) does not exist.
[concat] /Volumes/[...]/intermediate/at does not exist.
[concat] /Volumes/[...]/intermediate/javax.swing.text.html.parser.DocumentParser.parse(DocumentParser.java:105) does not exist.
[concat] /Volumes/[...]/intermediate/at does not exist.
[concat] /Volumes/[...]/intermediate/javax.swing.text.html.parser.ParserDelegator.parse(ParserDelegator.java:84) does not exist.
[concat] /Volumes/[...]/intermediate/at does not exist.
[concat] /Volumes/[...]/intermediate/ScriptsToConcat.main(ScriptsToConcat.java:50) does not exist.
("[...]" is for not showing my client's name, the route is OK)
I'm using latest h5bp build script and running "ant build"
I have the following in the html:
<!-- scripts concatenated and minified via build script -->
<script src="js/plugins.js"></script>
<!-- end scripts-->
and in the "js" folder I have a 12k plugins.js and a blank scripts.js (just in case I left it)
I'm using Mac OS 10.6.8 with latest Java.
The default.properties has all the default values.
I tried changing
tool.yuicompressor = yuicompressor-2.4.7.jar
to
tool.yuicompressor = closure-compiler-v1346.jar
but the same keeps happening. A new safasg.js file is in /publish/js/ but it's blank (actually 2 lines os whitespace)
I don't know how to troubleshoot this

On this line:
<!-- end scripts-->
There should be a space between the 's' and the '-->' part:
<!-- end scripts -->

Related

cannot delete a deploy file in artifactory

I deployed the file name efw immediately instead of efw.zip as the deploy file, and I can't delete efw. Can you help to find the solution?
2022-08-23 08:50:48,791 [http-nio-8081-exec-16] [ERROR] (o.a.r.c.e.m.GlobalExceptionMapper:48) - Expected a file but found a folder, at: auto-trashcan:aflac-hzn-RestrictedLib-repo/efw/efw
org.artifactory.api.repo.exception.FileExpectedException: Expected a file but found a folder, at: auto-trashcan:aflac-hzn-RestrictedLib-repo/efw/efw
at org.artifactory.storage.db.fs.model.DbMutableFileProvider.getMutableFile(DbMutableFileProvider.java:56)
at org.artifactory.repo.db.DbStoringRepoMixin.getMutableFile(DbStoringRepoMixin.java:684)
at org.artifactory.repo.db.DbLocalRepo.getMutableFile(DbLocalRepo.java:249)
at org.artifactory.repo.service.mover.BaseRepoPathMover.createMoveCopyContext(BaseRepoPathMover.java:522)
at org.artifactory.repo.service.mover.BaseRepoPathMover.moveFile(BaseRepoPathMover.java:506)
Looks like there's already a folder available under the trash can conflicting with the deletion task being performed. If it's fine with you, try to clear the "aflac-hzn-RestrictedLib-repo/efw/efw" from trash-can first and then attempt to delete it from the respository.

How to handle the "wildcard" * asterisk on a Windows Command

Using
Windows
Local by Flywheel
Composer (task runner)
Working on a Child Theme to a Custom Made "Core" theme.
I'm running composer install on the root of my WP directory to install dependencies on a parent and child theme.
Problem is when the installations are running it errors out when it gets to the src/*.js. I asked the team that set up the page and they told me that it was a problem with how Windows handles wildcard characters, which I understand it as the asterisk* and that they solved it in the pass by getting their employee a Mac. Since these dependencies are not going through, there's files that aren't loading on the website.
Getting a Mac, to solve this issue, is not on the table, so I'm looking to figure out what other options do I have to run this command successfully on a windows?
I tried going directly to the src/ folder and running npx wp-scripts start src on each .js file individually, and it gave a "successful build" message each time, but that didn't fix the issues on the page.
> wp-scripts build src/*.js
assets by status 95 bytes [cached] 2 assets
Entrypoint * = *.js *.asset.php
ERROR in *
Module not found: Error: Can't resolve './src/*.js' in 'C:\Users\UserName\Local Sites\localSiteName\app\public\wp-content\themes\parentThemeName'
resolve './src/*.js' in 'C:\Users\UserName\Local Sites\localSiteName\app\public\wp-content\themes\parentThemeName'
using description file: C:\Users\UserName\Local Sites\localSiteName\app\public\wp-content\themes\parentThemeName\package.json (relative path: .)
Field 'browser' doesn't contain a valid alias configuration
using description file: C:\Users\UserName\Local Sites\localSiteName\app\public\wp-content\themes\parentThemeName\package.json (relative path: ./src/*.js)
no extension
Field 'browser' doesn't contain a valid alias configuration
C:\Users\UserName\Local Sites\localSiteName\app\public\wp-content\themes\parentThemeName\src\*.js doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:\Users\UserName\Local Sites\localSiteName\app\public\wp-content\themes\parentThemeName\src\*.js.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
C:\Users\UserName\Local Sites\localSiteName\app\public\wp-content\themes\parentThemeName\src\*.js.json doesn't exist
.wasm
Field 'browser' doesn't contain a valid alias configuration
C:\Users\UserName\Local Sites\localSiteName\app\public\wp-content\themes\parentThemeName\src\*.js.wasm doesn't exist
as directory
C:\Users\UserName\Local Sites\localSiteName\app\public\wp-content\themes\parentThemeName\src\*.js doesn't exist
webpack 5.64.1 compiled with 1 error in 149 ms
Script cd wp-content/themes/parentThemeName && npm install && npm run build && composer install --no-interaction --ansi --ignore-platform-reqs handling the install-core-deps event returned with error code 1
Script composer install-core-deps && composer install-child-deps handling the post-install-cmd event returned with error code 1
Thanks for any and all help.
Cheers!

Msdeploy not removing the NON-empty directory during deployment

I am getting following error during deployment when there was a folder recursively removed from code. As a workaround i had to manually delete the folder from destination path on server.
Error: (12/26/2018 4:32:27 AM) An error occurred when the request was processed on the remote computer.
Error: An error was encountered when processing operation 'Delete Directory' on 'C:\Alam\Test\MSF\Config'.
Error: The error code was 0x80070091.
Error: The directory is not empty.
at Microsoft.Web.Deployment.NativeMethods.RaiseIOExceptionFromErrorCode(Win32ErrorCode errorCode, String maybeFullPat
h)
at Microsoft.Web.Deployment.DirectoryEx.Delete(String path)
at Microsoft.Web.Deployment.DirPathProviderBase.Delete(Boolean whatIf)
Error count: 1.
I can confirm this bug.
If a file in a directory that should be deleted (i.e. that is not excluded) is excluded then the file does not get deleted and the following rmdir crashes MsDeploy.
Work around
You must exactly ensure that no file exclution rule happens to match to a sub folder that is not excluded.
To satify this condition all file exclution rules must match from the deploy root path only. Otherwise a file in a sub directory may not be deleted and the following directory removal fails.
It can be quite difficult to ensure this, because the initial part of the deploy path ist typically not predictable if you do not always deploy to only one directory on only one server.
Fortunately MsDeploy tends to use different path delimiters for the target directory and the sub directories, e.g.:
Default Web Site/VirtualPath\Folder\File. Note the forward slash and the backslash.
So it is possible to use the forward slash as indicator of the root path.
Example
<MsDeploySkipRules Include="CustomSkipFile">
<ObjectName>filePath</ObjectName>
<AbsolutePath>/[^\\]+\\Custom</AbsolutePath>
</MsDeploySkipRules>
<MsDeploySkipRules Include="CustomSkipFile">
<ObjectName>dirPath</ObjectName>
<AbsolutePath>/[^\\]+\\Custom</AbsolutePath>
</MsDeploySkipRules>
This will exclude all files starting with Custom in the top level and all directories starting with Custom in the top level.
But this will not exclude a file that starts with Custom in a sub directory that does not start with Custom like notCustomDir\Custom.csv.
The /[^\\]+\\ prefix ensures that the following part cannot match to a deeper path because the latter is not delimited with a forward slash.
I would not consider this a sophisticated solution. It is just the only one I got working.

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

Why once deployed on Heroku I receive an "error compiling CSS assets"?

I saw similar questions but the error clause is a bit different, an I think is something about the assets pipeline.
The error:
NoMethodError: undefined method '[]' for nil:NilClass
(in app/app/assets/stylesheets/entypo.css)
/app/vendor/bundle/ruby/1.9.1/gems/sass-rails-3.2.6/lib/sass/rails/helpers.rb:32 in 'resolver'
What I did was to implement a Boostrap theme in the vendor directory, so is already included in the assets pipeline.
The entypo.css is the first file required by the theme main file called style.css , which is placed in
app/assets/stylesheets/
while entypo.css is placed in:
vendor/assets/stylesheets/
I'm not sure that the error resides here, because locally everything works just fine, the issue comes when I deploy on Heroku, because for some reason the compiler seeks for the css to compile in
app/app/assets/stylesheets/entypo.css
Any clue?

Resources