What could be the reason of such error? It's bound...
# javascript
r
What could be the reason of such error? It's bound to the specific user environment, but I can't find a clue what exactly is wrong. Any ideas? Any additional logs we can check?
Copy code
C:\data\master\experimenting-with-kotlin-js>gradlew.bat run -t

> Task :kotlinNpmInstall FAILED
error Couldn't find package "is-sorted@*" required by "experimenting-with-kotlin-js@1.0.0-SNAPSHOT" on the "npm" registry.
Error: Couldn't find package "webpack@4.41.2" required by "experimenting-with-kotlin-js@1.0.0-SNAPSHOT" on the "npm" registry.
    at MessageError.ExtendableBuiltin (C:\Users\joerg.rade\.gradle\yarn\yarn-v1.21.1\lib\cli.js:721:66)
    at new MessageError (C:\Users\joerg.rade\.gradle\yarn\yarn-v1.21.1\lib\cli.js:750:123)
    at PackageRequest.<anonymous> (C:\Users\joerg.rade\.gradle\yarn\yarn-v1.21.1\lib\cli.js:36539:17)
    at Generator.throw (<anonymous>)
    at step (C:\Users\joerg.rade\.gradle\yarn\yarn-v1.21.1\lib\cli.js:310:30)
    at C:\Users\joerg.rade\.gradle\yarn\yarn-v1.21.1\lib\cli.js:323:13
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
Error: Couldn't find package "webpack-dev-server@3.9.0" required by "experimenting-with-kotlin-js@1.0.0-SNAPSHOT" on the "npm" registry.
    at MessageError.ExtendableBuiltin (C:\Users\joerg.rade\.gradle\yarn\yarn-v1.21.1\lib\cli.js:721:66)
    at new MessageError (C:\Users\joerg.rade\.gradle\yarn\yarn-v1.21.1\lib\cli.js:750:123)
    at PackageRequest.<anonymous> (C:\Users\joerg.rade\.gradle\yarn\yarn-v1.21.1\lib\cli.js:36539:17)
    at Generator.throw (<anonymous>)
    at step (C:\Users\joerg.rade\.gradle\yarn\yarn-v1.21.1\lib\cli.js:310:30)
    at C:\Users\joerg.rade\.gradle\yarn\yarn-v1.21.1\lib\cli.js:323:13
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
Error: Couldn't find package "webpack-cli@3.3.10" required by "experimenting-with-kotlin-js@1.0.0-SNAPSHOT" on the "npm" registry.
    at MessageError.ExtendableBuiltin (C:\Users\joerg.rade\.gradle\yarn\yarn-v1.21.1\lib\cli.js:721:66)
    at new MessageError (C:\Users\joerg.rade\.gradle\yarn\yarn-v1.21.1\lib\cli.js:750:123)
    at PackageRequest.<anonymous> (C:\Users\joerg.rade\.gradle\yarn\yarn-v1.21.1\lib\cli.js:36539:17)
    at Generator.throw (<anonymous>)
    at step (C:\Users\joerg.rade\.gradle\yarn\yarn-v1.21.1\lib\cli.js:310:30)
    at C:\Users\joerg.rade\.gradle\yarn\yarn-v1.21.1\lib\cli.js:323:13
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':kotlinNpmInstall'.
>                 Process 'Resolving NPM dependencies using yarn' returns 1

                  yarn install v1.21.1
  info No lockfile found.
  [1/4] Resolving packages...
  info Visit <https://yarnpkg.com/en/docs/cli/install> for documentation about this command.


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at <https://help.gradle.org>

BUILD FAILED in 11s
2 actionable tasks: 2 executed
i
It can be problem with private npm registry (if it exists) or maybe internet problems In case of private npm registry (for organisations for example) you can define file
.npmrc
or
.yarnrc
where you set registry
registry=…
🙏 1
r
Doesn't seem to be the case.
The build process creates correctly both package.json files (
build/js/package.json
and
build/js/packages/[project]/package.json
But
node_modules
directories are not created.
There were no such problems with old
kotlin2js
plugin and
kotlin-fronted-plugin
on the same environment.
There is also no
build/js/yarn.lock
file.
It can be corporate proxy problem after all ...
t
Is there limited network access?