peh / grails-babel-asset-pipeline Goto Github PK
View Code? Open in Web Editor NEWbabel.js transformation for grails-asset-pipeline
babel.js transformation for grails-asset-pipeline
Hi There,
When we use the plugin 1.4.5 with grails 2.5.4 and asset pipeline 2.8.0 + ,
We got the error asset.pipeline.AssetHelper not found when loading the page.
Cheers
After updating asset pipeline from 2.9.1 to 2.13.1 due to a critical filter bug, I receive the following error from Babel.
Env: Grails 2.4.4, Oracle Java SDK 7, OSX 10.12.2
WAR packaging error: TypeError: org.mozilla.javascript.Undefined@1e83a64 is not a function, it is undefined. (file://.m2/repository/net/errbuddy/plugins/babel-asset-pipeline/1.4.5-java7/babel-asset-pipeline-1.4.5-java7.jar!/asset/pipeline/babel/env.rhino.js#2346)
Error installing the plugin on grails 2.5.1.
I added compile ":babel-asset-pipeline:1.3.1" to BuidConfig.groovy.
I try to lunch the project and the console shows:
Error |
Resolve error obtaining dependencies: Could not find artifact net.errbuddy.plugins:babel-asset-pipeline:jar:1.3.0 in grailsCentral (https://repo.grails.org/grails/plugins)
Error |
Resolve error obtaining dependencies: Could not find artifact net.errbuddy.plugins:babel-asset-pipeline:jar:1.3.0 in grailsCentral (https://repo.grails.org/grails/plugins) (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact net.errbuddy.plugins:babel-asset-pipeline:jar:1.3.0 in grailsCentral (https://repo.grails.org/grails/plugins)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:384)
at grails.util.BuildSettings.doResolve(BuildSettings.groovy:513)
at grails.util.BuildSettings.doResolve(BuildSettings.groovy)
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1426)
at grails.util.BuildSettings$_getDefaultCompileDependencies_closure15.doCall(BuildSettings.groovy:503)
at grails.util.BuildSettings$_getDefaultCompileDependencies_closure15.doCall(BuildSettings.groovy)
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1426)
at grails.util.BuildSettings.getDefaultCompileDependencies(BuildSettings.groovy:496)
at grails.util.BuildSettings.getCompileDependencies(BuildSettings.groovy:472)
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1426)
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact net.errbuddy.plugins:babel-asset-pipeline:jar:1.3.0 in grailsCentral (https://repo.grails.org/grails/plugins)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:367)
... 9 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact net.errbuddy.plugins:babel-asset-pipeline:jar:1.3.0 in grailsCentral (https://repo.grails.org/grails/plugins)
at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:39)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
... 11 more
Error |
Resolve error obtaining dependencies: Could not find artifact net.errbuddy.plugins:babel-asset-pipeline:jar:1.3.0 in grailsCentral (https://repo.grails.org/grails/plugins)
Error |
Could not find artifact net.errbuddy.plugins:babel-asset-pipeline:jar:1.3.0 in grailsCentral (https://repo.grails.org/grails/plugins)
|Run 'grails dependency-report' for further information.
Hi,
Do you plan to have grails3 version support.
Thanks
I just wonder what is the proper way how to include babel polyfill to my project. should it by distributed with the plugin?
I am pretty green when it comes to JS. I was using jsx-grails-pipeline and it was plain and simple. Just do a asset:javascript and pass the jsx file but it fails with an unknown error when trying to create a war file. With this plugin I am getting require errors (mobx is not defined, React is not defined, require is not defined). I tried setting
grails.assets.babel.processor = 'direct'
But this didn't help. I am using grails 2.5.5, asset pipeline 2.5.7
Please suggest what kind of setup do I get this to work with the asset pipeline with minimum hassle. Do i need to require everything in my jsx's?
Hi,
This exception always raised after server start. But after second attempt anything is ok
Message: babel-transforming user-side-restriction-ccy.es6 failed: org.mozilla.javascript.EcmaError: ReferenceError: "babel" is not defined.
Line | Method
->> 76 | process in asset.pipeline.babel.BabelProcessor
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 160 | processedStream in asset.pipeline.AbstractAssetFile
| 307 | fileContents . . . . in asset.pipeline.DirectiveProcessor
| 65 | serveUncompiledAsset in asset.pipeline.AssetPipeline
| 171 | doFilter . . . . . . in asset.pipeline.grails.AssetPipelineFilter
| 1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 617 | run . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
My enviroment:
grails: 2.4.5, windows 7, asset-pipeline :asset-pipeline:2.6.10
Latest version shows 2.4.5 in releases, but the Plugin descriptor states
def version = "1.4.5"
and the README states 1.4.2.
Maybe update the README and release 1.4.5?
It seems the underlying babel-asset-pipeline 1.4.5 Version was compiled using Java 8, therefore when running e.g. in Grails 2.4.4 using Java 7:
ERROR asset.pipeline.AssetSpecLoader - Error loading asset specification asset.pipeline.babel.Es6AssetFile: asset/pipeline/babel/Es6AssetFile : Unsupported major.minor version 52.0
java.lang.UnsupportedClassVersionError: asset/pipeline/babel/Es6AssetFile : Unsupported major.minor version 52.0
Need specific instructions for using this plugin in Grails 3.2.x
Also, can I use this plugin if my goals is this: I already have significant code base written in angular 1.3.x and am working on moving it to angular 2.x gradually and first step is to start refactoring existing code to es6 syntax one by one and so my code base will consist of both: *.js (ES5) and new *.es6 (ES6) files.
Thanks!
This clashes in Grails 2.x with SLF4j bindings:
Error SLF4J: Class path contains multiple SLF4J bindings.
| Error SLF4J: Found binding in [jar:file:/Users/dx/.grails/wrapper/2.4.4/grails-2.4.4/dist/grails-plugin-log4j-2.4.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
| Error SLF4J: Found binding in [jar:file:/Users/dx/.m2/repository/ch/qos/logback/logback-classic/1.1.3/logback-classic-1.1.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
| Error SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
| Error SLF4J: Actual binding is of type [org.slf4j.impl.GrailsSlf4jLoggerFactory]
Dependency tree:
+--- org.grails.plugins:babel-asset-pipeline:1.4.2
| \--- net.errbuddy.plugins:babel-asset-pipeline:1.4.2
| \--- ch.qos.logback:logback-classic:1.1.3
| \--- ch.qos.logback:logback-core:1.1.3
Hello. I'm trying use the plugin on Java 7 but the dependency net.errbuddy.plugins:babel-asset-pipeline could not resolve. I already saw the issue about this and its seems to works, but no for me.
| Downloading: org/grails/plugins/babel-asset-pipeline/1.4.5-java7/babel-asset-pipeline-1.4.5-java7.zip | Error Resolve error obtaining dependencies: Could not find artifact net.errbuddy.plugins:babel-asset-pipeline:jar:1.4.5-java7 in grailsCentral (http://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.