Renjin NullPointerException

问题描述

如果我在Maven中运行具有以下依赖项的Renjin,则会在Java中获得NullPointerException:


node-gyp rebuild


C:\Users\ASUS-X441M\Desktop\ReadMemoryJS\node_modules\memoryjs>if not defined npm_config_node_gyp (node "D:\Program Files\NodeJS\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "D:\Program Files\NodeJS\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Command Failed: C:\Program Files (x86)\python38-32\python.exe -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>",line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                       ^
gyp ERR! stack SyntaxError: invalid Syntax
gyp ERR! stack
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:299:12)
gyp ERR! stack     at ChildProcess.emit (events.js:193:13)
gyp ERR! stack     at maybeClose (internal/child_process.js:999:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:266:5)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "D:\\Program Files\\NodeJS\\node.exe" "D:\\Program Files\\NodeJS\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\ASUS-X441M\Desktop\ReadMemoryJS\node_modules\memoryjs
gyp ERR! node -v v11.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN eslint-config-airbnb-base@12.1.0 requires a peer of eslint@^4.9.0 but none is installed. You must install peer dependencies yourself.
npm WARN bl@0.7.0 requires a peer of stream-browserify@* but none is installed. You must install peer dependencies yourself.
npm WARN readmemoryjs@1.0.0 No description
npm WARN readmemoryjs@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! memoryjs@3.2.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the memoryjs@3.2.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

我在Java中遇到的异常是:

 <dependencyManagement>
<dependencies>
  <dependency>
    <groupId>org.renjin</groupId>
    <artifactId>renjin-script-engine</artifactId>
    <version>0.9.2725</version>
  </dependency>
  <dependency>
    <groupId>org.renjin.cran</groupId>
    <artifactId>e1071</artifactId>
    <version>1.7-0-b8</version>
  </dependency>
  <dependency>
    <groupId>org.renjin.cran</groupId>
    <artifactId>ranger</artifactId>
    <version>0.11.2-b1</version>
  </dependency>
</dependencies>

我已经在R版本4.0.2中测试了我的代码,它确实有效!

请帮助我。

感谢支持

最好的问候

Pinar Tas

解决方法

使用具有Maven依赖项的最新版本的Renjin(版本0.9.276):

<groupId>org.renjin</groupId>
<artifactId>renjin-script-engine</artifactId>
<version>3.5-beta76</version>

我在Java中得到以下异常:

org.renjin.eval.EvalException: cannot read workspace version 3 written by R 3.5.0; need R 3.5.0 or newer

所以我的问题是:人人的新版本何时发布?

感谢支持!

最好的问候

皮纳尔