Skip to content
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

Error while import from kotlin library #2

Open
LionZXY opened this issue Dec 19, 2017 · 1 comment
Open

Error while import from kotlin library #2

LionZXY opened this issue Dec 19, 2017 · 1 comment

Comments

@LionZXY
Copy link

LionZXY commented Dec 19, 2017

I add in sample line:

import kotlin.math.*;

and

println(acos(1))

And webpack crashed:


> webpack-kotlin-loader@0.3.2 compile-simple /home/lionzxy/IdeaProjects/kotlin-loader
> rm -rf examples/simple/dist && webpack --config examples/simple/webpack.config

 
 kotlin-js compilation failed. 
 examples/simple/test-file.kt:3:15: error: unresolved reference: math
import kotlin.math.*;
              ^
examples/simple/test-file.kt:7:13: error: unresolved reference: acos
    println(acos(1))
            ^
 
(node:10751) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'forEach' of undefined
(node:10751) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

How i can add kotlin library in code?

@andrey-skl
Copy link
Owner

@LionZXY I'm sorry, but this loader is no more supported. Please try kotlin-webpack-plugin instead: https://www.npmjs.com/package/kotlin-webpack-plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants