Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Update so that we can build with Node 10.x #24

Closed
yaweiw opened this issue Apr 4, 2019 · 3 comments · Fixed by #25
Closed

Update so that we can build with Node 10.x #24

yaweiw opened this issue Apr 4, 2019 · 3 comments · Fixed by #25

Comments

@yaweiw
Copy link

yaweiw commented Apr 4, 2019

Try to run 'yarn' on root to build the app but failed with interesting error.

d:\work\projects\theia-cpp-extension\node_modules\vscode-nsfw\src\nsfw.cpp(56): warning C4996: 'Nan::Callback::Call': was declared deprecated [D:\work\projects\theia-cpp-extension\node_modules\vscode-nsfw\build\nsfw.vcxproj]
  d:\work\projects\theia-cpp-extension\node_modules\nan\nan.h(1655): note: see declaration of 'Nan::Callback::Call'
d:\work\projects\theia-cpp-extension\node_modules\vscode-nsfw\src\nsfw.cpp(98): warning C4996: 'Nan::Callback::Call': was declared deprecated [D:\work\projects\theia-cpp-extension\node_modules\vscode-nsfw\build\nsfw.vcxproj]
  d:\work\projects\theia-cpp-extension\node_modules\nan\nan.h(1655): note: see declaration of 'Nan::Callback::Call'
d:\work\projects\theia-cpp-extension\node_modules\vscode-nsfw\src\nsfw.cpp(159): error C2661: 'v8::Function::NewInstance': no overloaded function takes 0 arguments [D:\work\projects\theia-cpp-extension\node_modules\vscode-nsfw\build\nsfw.vcxproj]
d:\work\projects\theia-cpp-extension\node_modules\vscode-nsfw\src\nsfw.cpp(176): warning C4996: 'v8::Value::Uint32Value': was declared deprecated [D:\work\projects\theia-cpp-extension\node_modules\vscode-nsfw\build\nsfw.vcxproj]
  c:\users\w00483108\.node-gyp\10.15.3\include\node\v8.h(2477): note: see declaration of 'v8::Value::Uint32Value'
d:\work\projects\theia-cpp-extension\node_modules\vscode-nsfw\src\nsfw.cpp(177): warning C4996: 'v8::String::Utf8Value::Utf8Value': was declared deprecated [D:\work\projects\theia-cpp-extension\node_modules\vscode-nsfw\build\nsfw.vcxproj]
  c:\users\w00483108\.node-gyp\10.15.3\include\node\v8.h(2891): note: see declaration of 'v8::String::Utf8Value::Utf8Value'
d:\work\projects\theia-cpp-extension\node_modules\vscode-nsfw\src\nsfw.cpp(208): warning C4996: 'Nan::Callback::Call': was declared deprecated [D:\work\projects\theia-cpp-extension\node_modules\vscode-nsfw\build\nsfw.vcxproj]
  d:\work\projects\theia-cpp-extension\node_modules\nan\nan.h(1655): note: see declaration of 'Nan::Callback::Call'
d:\work\projects\theia-cpp-extension\node_modules\vscode-nsfw\src\nsfw.cpp(254): warning C4996: 'Nan::Callback::Call': was declared deprecated [D:\work\projects\theia-cpp-extension\node_modules\vscode-nsfw\build\nsfw.vcxproj]
  d:\work\projects\theia-cpp-extension\node_modules\nan\nan.h(1655): note: see declaration of 'Nan::Callback::Call'
d:\work\projects\theia-cpp-extension\node_modules\vscode-nsfw\src\nsfw.cpp(256): warning C4996: 'Nan::Callback::Call': was declared deprecated [D:\work\projects\theia-cpp-extension\node_modules\vscode-nsfw\build\nsfw.vcxproj]
  d:\work\projects\theia-cpp-extension\node_modules\nan\nan.h(1655): note: see declaration of 'Nan::Callback::Call'
d:\work\projects\theia-cpp-extension\node_modules\vscode-nsfw\src\nsfw.cpp(281): warning C4996: 'Nan::Callback::Call': was declared deprecated [D:\work\projects\theia-cpp-extension\node_modules\vscode-nsfw\build\nsfw.vcxproj]
  d:\work\projects\theia-cpp-extension\node_modules\nan\nan.h(1655): note: see declaration of 'Nan::Callback::Call'
d:\work\projects\theia-cpp-extension\node_modules\vscode-nsfw\src\nsfw.cpp(323): warning C4996: 'Nan::Callback::Call': was declared deprecated [D:\work\projects\theia-cpp-extension\node_modules\vscode-nsfw\build\nsfw.vcxproj]
  d:\work\projects\theia-cpp-extension\node_modules\nan\nan.h(1655): note: see declaration of 'Nan::Callback::Call'
gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (D:\work\projects\theia-cpp-extension\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\work\\projects\\theia-cpp-extension\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\work\projects\theia-cpp-extension\node_modules\vscode-nsfw
@marcdumais-work
Copy link
Contributor

Hi @yaweiw ,

Has this worked before for you? nsfw has a native part, that's built in post-install for your platform. It's assumed that the tools to build this C++ module are available on your host (Windows in this case).

You could try the following to insulate the problem:
From a temporary directory, do:

$> npm init -y
$> npm install nsfw --add-dep

This should pull nsfw from npm and attempt to build the native part. Do you have the same errors?

@yaweiw
Copy link
Author

yaweiw commented Apr 9, 2019

yes i think it's mentioned in this issue eclipse-theia/theia#2009. Node 10.* isn't supported.

@yaweiw yaweiw closed this as completed Apr 9, 2019
@marcdumais-work
Copy link
Contributor

Hi @yaweiw

Node 10.* isn't supported.

That was true until yesterday, when support for Node 10.x has been merged in the main Theia repo. So it works now for next theia applications and will for latest once this is released at the end of the month. Theia extensions hosted outside the main repo, like the two in this repo here, might need little adjustments.

I just tried to build using Node 10 and it failed, like you on the nsfw module. I remove yarn.lock and then it built. It still needs to be tested though - I will submit a PR.

Re-opening this issue.

@marcdumais-work marcdumais-work changed the title vscode-nsfw: Command failed Update so that we can build with Node 10.x Apr 9, 2019
marcdumais-work added a commit that referenced this issue Apr 10, 2019
so that latest "@theia/*" extensions are pulled

Problem: Following the Theia update to support Node 10.x,
I tried to test if there were impacts on this repo here.
However I noticed that older @theia/* extensions were being
pulled, from a couple of releases ago. I think it's because
we had stepped the "minor" versions vs what was in yarn.lock.
In this case, yarn will not automatically pull the new version
for these packages, as they may be incompatible.

I first attempted to run "yarn upgrade-interactive" to update
the "@theia/*" extensions but it crashed before being done. So
in the end I just removed all references to these extensions
from "yarn.lock" and it did the trick.

Fixes #24

Signed-off-by: Marc Dumais <marc.dumais@ericsson.com>
vince-fugnitto pushed a commit that referenced this issue Jun 17, 2019
so that latest "@theia/*" extensions are pulled

Problem: Following the Theia update to support Node 10.x,
I tried to test if there were impacts on this repo here.
However I noticed that older @theia/* extensions were being
pulled, from a couple of releases ago. I think it's because
we had stepped the "minor" versions vs what was in yarn.lock.
In this case, yarn will not automatically pull the new version
for these packages, as they may be incompatible.

I first attempted to run "yarn upgrade-interactive" to update
the "@theia/*" extensions but it crashed before being done. So
in the end I just removed all references to these extensions
from "yarn.lock" and it did the trick.

Fixes #24

Signed-off-by: Marc Dumais <marc.dumais@ericsson.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@yaweiw @marcdumais-work and others