I am getting the error below when I try to build from source. I have tried it on Macos as well as Ubuntu 16.04 and get the same error on both,
code-server-1.1156-vsc1.33.1/packages/vscode/src/fill/workbenchRegistry.ts
code-server-1.1156-vsc1.33.1/packages/vscode/src/fill/workspacesService.ts
/home/bitnami/.node-gyp/12.1.0/include/node/v8.h:5947:46: note: candidate expects 1 argument, 0 provided
../src/unix/pty.cc:711:67: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
Nan::New
^
In file included from /home/bitnami/.node-gyp/12.1.0/include/node/node.h:63:0,
from ../../nan/nan.h:53,
from ../src/unix/pty.cc:20:
/home/bitnami/.node-gyp/12.1.0/include/node/v8.h:5947:46: note: candidate: v8::MaybeLocal
V8_WARN_UNUSED_RESULT MaybeLocal
^
/home/bitnami/.node-gyp/12.1.0/include/node/v8.h:5947:46: note: candidate expects 1 argument, 0 provided
../src/unix/pty.cc:714:68: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
Nan::New
^
In file included from /home/bitnami/.node-gyp/12.1.0/include/node/node.h:63:0,
from ../../nan/nan.h:53,
from ../src/unix/pty.cc:20:
/home/bitnami/.node-gyp/12.1.0/include/node/v8.h:5947:46: note: candidate: v8::MaybeLocal
V8_WARN_UNUSED_RESULT MaybeLocal
^
/home/bitnami/.node-gyp/12.1.0/include/node/v8.h:5947:46: note: candidate expects 1 argument, 0 provided
pty.target.mk:107: recipe for target 'Release/obj.target/pty/src/unix/pty.o' failed
make: Leaving directory '/home/vscode/code-server/node_modules/node-pty/build'
make: * [Release/obj.target/pty/src/unix/pty.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/opt/bitnami/nodejs/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:196:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:256:12)
gyp ERR! System Linux 4.4.0-1081-aws
gyp ERR! command "/opt/bitnami/nodejs/bin/.node.bin" "/opt/bitnami/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/vscode/code-server/node_modules/node-pty
gyp ERR! node -v v12.1.0
Looks like you're building with node 12.1.0, which I'm not sure we support yet. Try again with 10.15.1 (which is what we use to build code-server).
@deansheather Thank you for the response. On my Mac I have node 10.16.0 and on Ubuntu I have node 12.1.0. Let me give it another try on Ubuntu by downgrading to node 10.15.1.
I will update you soon.
@deansheather after downgrading NPM version, I am able to install dependencies. Everything works well till I run "sudo yarn start" which fails with the errors below:
sudo yarn start
yarn run v1.16.0
$ cd ./packages/server && yarn start
warning package.json: No license field
warning ../package.json: No license field
$ node --max-old-space-size=32384 --require ts-node/register --require tsconfig-paths/register src/cli.ts
/home/vscode/code-server-src/packages/server/node_modules/ts-node/src/index.ts:261
return new TSError(diagnosticText, diagnosticCodes)
^
TSError: ⨯ Unable to compile TypeScript:
../protocol/src/browser/modules/spdlog.ts(1,25): error TS7016: Could not find a declaration file for module 'spdlog'. '/home/vscode/code-server-src/node_modules/spdlog/index.js' implicitly has an 'any' type.
Try npm install @types/spdlog if it exists or add a new declaration (.d.ts) file containing declare module 'spdlog';
at createTSError (/home/vscode/code-server-src/packages/server/node_modules/ts-node/src/index.ts:261:12)
at getOutput (/home/vscode/code-server-src/packages/server/node_modules/ts-node/src/index.ts:367:40)
at Object.compile (/home/vscode/code-server-src/packages/server/node_modules/ts-node/src/index.ts:558:11)
at Module.m._compile (/home/vscode/code-server-src/packages/server/node_modules/ts-node/src/index.ts:439:43)
at Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Object.require.extensions.(anonymous function) [as .ts] (/home/vscode/code-server-src/packages/server/node_modules/ts-node/src/index.ts:442:12)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Sorry for the late response. Try running the following:
yarn
NODE_ENV=production VERSION=local-dev yarn task build:server:binary
yarn task package local-dev
Once that finishes, the binary should be available in ./packages/server/cli-linux-64.
Is it possible to start the application without compiling the binary? It's a bit tedious to recompile after every change during development. yarn start yields exactly what @devops-jokerguy has posted.
@code-asher ^
Hey OP, do you still encounter building issues?
Also I suggest building against v2 instead.
Hi Ayane,
I was able to build. Thank you very much. I will try against v2 as well.
On Fri, Sep 13, 2019 at 12:15 AM Ayane Satomi notifications@github.com
wrote:
Hey OP, do you still encounter building issues?
Also I suggest building against v2 instead.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/cdr/code-server/issues/774?email_source=notifications&email_token=AJUQBMIR6P7DJF3OZLJ6UU3QJJTIRA5CNFSM4HYOMUL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6SN27Y#issuecomment-530898303,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJUQBMO44VZVIH254LKKT73QJJTIRANCNFSM4HYOMULQ
.
--
Best Regards,
Vahid
HP: +65.9487.0070
Email: [email protected]
Web: www.jokerguy.com