Giter Site home page Giter Site logo

winnekes / itypescript Goto Github PK

View Code? Open in Web Editor NEW

This project forked from n-riesco/ijavascript

187.0 187.0 29.0 2.24 MB

ITypescript is a typescript kernel for the Jupyter notebook (A modified version of IJavascript)

License: Other

JavaScript 98.57% TypeScript 1.43%

itypescript's Introduction

#fromnursetodeveloper 🩺 > πŸ’»

beep boop

I strive for three things in development: clarity, reusability and beauty.

πŸ’‘ Currently working on

  • ITypeScript - Kernel for Jupyter Notebook, allowing you to play around with TypeScript notebooks
  • Steve the Robot (working title): IoT - a cute, mischievous desk robot with his own personality
  • SimplyShift - a simple calendar for people with irregular hours
  • sturmglas -track your mental weather
  • From Scrubs to Slacks - blog series about my career switch, bootcamp experience and things I have learned in the past couple of years (publishing on Medium and Hashnode)

πŸ‘‹πŸΌ Say hello!

I'm always up for a β˜• chat!

LinkedIn Instagram Mail

πŸ“ Find me on

Medium Hashnode

itypescript's People

Contributors

adeelshahid avatar antimatter15 avatar bgnkim avatar ianedington avatar idantene avatar int3h avatar joeflack4 avatar krinsman avatar lgeiger avatar mandarvaze avatar minrk avatar n-riesco avatar parmentelat avatar rgbkrk avatar willwhitney avatar winnekes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

itypescript's Issues

Cannot find module zmq.node

Anyone get this error:

`Error: Cannot find module '../build/Release/zmq.node'
Require stack:
- C:\Users\RathnamJeyachandran\AppData\Roaming\npm\node_modules\itypescript\node_modules\zeromq\lib\index.js
- C:\Users\RathnamJeyachandran\AppData\Roaming\npm\node_modules\itypescript\node_modules\zeromq\index.js
- C:\Users\RathnamJeyachandran\AppData\Roaming\npm\node_modules\itypescript\node_modules\jmp\index.js
- C:\Users\RathnamJeyachandran\AppData\Roaming\npm\node_modules\itypescript\node_modules\jp-kernel\lib\jp-kernel.js
- C:\Users\RathnamJeyachandran\AppData\Roaming\npm\node_modules\itypescript\node_modules\jp-kernel\index.js
- C:\Users\RathnamJeyachandran\AppData\Roaming\npm\node_modules\itypescript\lib\kernel.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15)
    at Function.Module._load (internal/modules/cjs/loader.js:864:27)
    at Module.require (internal/modules/cjs/loader.js:1044:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (C:\Users\RathnamJeyachandran\AppData\Roaming\npm\node_modules\itypescript\node_modules\zeromq\lib\index.js:6:11)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14)
    at Module.require (internal/modules/cjs/loader.js:1044:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\RathnamJeyachandran\\AppData\\Roaming\\npm\\node_modules\\itypescript\\node_modules\\zeromq\\lib\\index.js',
    'C:\\Users\\RathnamJeyachandran\\AppData\\Roaming\\npm\\node_modules\\itypescript\\node_modules\\zeromq\\index.js',
    'C:\\Users\\RathnamJeyachandran\\AppData\\Roaming\\npm\\node_modules\\itypescript\\node_modules\\jmp\\index.js',
    'C:\\Users\\RathnamJeyachandran\\AppData\\Roaming\\npm\\node_modules\\itypescript\\node_modules\\jp-kernel\\lib\\jp-kernel.js',
    'C:\\Users\\RathnamJeyachandran\\AppData\\Roaming\\npm\\node_modules\\itypescript\\node_modules\\jp-kernel\\index.js',
    'C:\\Users\\RathnamJeyachandran\\AppData\\Roaming\\npm\\node_modules\\itypescript\\lib\\kernel.js'
  ]
}
`

can not install

PS F:\work\netcorework> npm install -g itypescript
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm ERR! code 1
npm ERR! path C:\Users\hjjls\AppData\Roaming\npm\node_modules\itypescript\node_modules\zeromq
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp-build || npm run build:libzmq
npm ERR! > [email protected] build:libzmq
npm ERR! > node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.0 found at "C:\Users\hjjls\AppData\Local\Programs\Python\Python310\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:404:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1064:16)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\hjjls\AppData\Roaming\npm\node_modules\itypescript\node_modules\zeromq
npm ERR! gyp ERR! node -v v16.13.0
npm ERR! gyp ERR! node-gyp -v v8.2.0
npm ERR! gyp ERR! not ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.0 found at "C:\Users\hjjls\AppData\Local\Programs\Python\Python310\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:404:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1064:16)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\hjjls\AppData\Roaming\npm\node_modules\itypescript\node_modules\zeromq
npm ERR! gyp ERR! node -v v16.13.0
npm ERR! gyp ERR! node-gyp -v v8.2.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\hjjls\AppData\Local\npm-cache_logs\2021-11-19T02_14_13_897Z-debug.log

prebuild-install WARN install EACCES on Amazonlinux

Hello,
I've got a small problem when I try to install the kernel :

node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)

prebuild-install WARN install EACCES: permission denied, access '/root/.npm'

fs.js:114
throw err;
^

Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/itypescript/node_modules/zeromq/zmq'
at Object.mkdirSync (fs.js:752:3)
at Object. (/usr/lib/node_modules/itypescript/node_modules/zeromq/scripts/preinstall.js:89:8)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
npm ERR! code ELIFECYCLE

I'm root.. no access problem I think.. but I always have this error... any clue ?
Thanks

typechecking (obey tsconfig.json)

How do I get the interpreter to obey tsconfig.json? Right now, it seems to completely ignore typechecking.

I can do something like this

let add = function(x : number, y : number) { return x + y }
add("x", "y")

And it will compile returning "xy".

Cannot find name $TS

Any Ideas?

Screenshot 2020-04-17 00 27 10

my tsconfig.json

{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "strict": true,
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true 
  }
}

Problem with kernel installation

I'm trying to install typescript kernel, but I'm getting an error: "Error parsing version".

Command npm install -g itypescript run successfully.

But command its --install=local produced the following output

Error parsing version: jupyter core     : 4.5.0
jupyter-notebook : 5.7.8
qtconsole        : 4.5.1
ipython          : 7.6.1
ipykernel        : 5.1.1
jupyter client   : 5.3.1
jupyter lab      : 1.0.2
nbconvert        : 5.5.0
ipywidgets       : 7.5.0
nbformat         : 4.4.0
traitlets        : 4.3.2

I'm working in a virtual environment with the following version of python.

$ python --version
Python 3.7.2

I'm already install javascript and java kernels.

$ jupyter kernelspec list
Available kernels:
  javascript    /Users/petr/Library/Jupyter/kernels/javascript
  python3       /Users/petr/code/practice/cs-education/.venv/share/jupyter/kernels/python3
  java          /usr/local/share/jupyter/kernels/java

Maybe there is some conflict among kernels?

$TS is not defined

Hi

I'm following the sample here
But got $TS is not defined when I try to execute $TS.log("hello, world!");

I'm I missing something?

Issue with variable scoping using (IIFE)

Hello,
This issue related to variable scoping and default behaviour described in the doc.
As described in the doc I cannot re-declare constants and classes or execute the same cell twice.

ITypescript cannot know which cell is currently executing, you cannot redeclare the variables if you define with let or equivalent keywords

IJavaScript has the same behaviour, but I can get around it by using IIFE:

(() => {
    class Something {
        constructor(test){
            console.log(test)
        }
    }
    const test = 23
    console.log(test)
    new Something('test')
})()

Now, I don't know if it is specific to TypeScript, but apparently I cannot use the same trick with ITypeScript:

(() => {
   class Example {
    constructor(test = "test") {
        console.log(test);
    }
   }

    new Example();
    new Example("It works!"); 
})()

On the first call I receive expected result. But if try second time I receive following error:

Error: Conflict with a committed line: 
(() => {
^
TS2349: This expression is not callable.
  Type 'void' has no call signatures.
    at execTranspile (/Users/nesterow/.nvm/versions/node/v10.17.0/lib/node_modules/itypescript/lib/kernel.js:203:27)
    at Session.transpiler [as transpile] (/Users/nesterow/.nvm/versions/node/v10.17.0/lib/node_modules/itypescript/lib/kernel.js:263:37)
    at Session._runNow (/Users/nesterow/.nvm/versions/node/v10.17.0/lib/node_modules/itypescript/node_modules/nel/lib/nel.js:796:39)
    at Session._run (/Users/nesterow/.nvm/versions/node/v10.17.0/lib/node_modules/itypescript/node_modules/nel/lib/nel.js:766:14)
    at Session.execute (/Users/nesterow/.nvm/versions/node/v10.17.0/lib/node_modules/itypescript/node_modules/nel/lib/nel.js:890:10)
    at Kernel.execute_request (/Users/nesterow/.nvm/versions/node/v10.17.0/lib/node_modules/itypescript/node_modules/jp-kernel/lib/handlers_v5.js:116:18)
    at Kernel.onShellMessage (/Users/nesterow/.nvm/versions/node/v10.17.0/lib/node_modules/itypescript/node_modules/jp-kernel/lib/jp-kernel.js:285:41)
    at Socket.<anonymous> (/Users/nesterow/.nvm/versions/node/v10.17.0/lib/node_modules/itypescript/node_modules/jmp/index.js:350:17)
    at Socket.emit (events.js:198:13)
    at Socket._emitMessage (/Users/nesterow/.nvm/versions/node/v10.17.0/lib/node_modules/itypescript/node_modules/zeromq/lib/index.js:640:15)

Error while installing msnodesqlv8

Hi,

I am trying to install msnodesqlv8 package on openshift pod, but I'm getting the following error:
`

[email protected] install /opt/app-root/src/node_modules/msnodesqlv8
--
Β  | > prebuild-install || node-gyp rebuild
Β  | Β 
Β  | prebuild-install WARN install EACCES: permission denied, mkdir '/opt/app-root/src/node_modules/msnodesqlv8/build'
Β  | gyp ERR! configure error
Β  | gyp ERR! stack Error: EACCES: permission denied, mkdir '/opt/app-root/src/node_modules/msnodesqlv8/build'
Β  | gyp ERR! System Linux 3.10.0-1160.11.1.el7.x86_64
Β  | gyp ERR! command "/opt/rh/rh-nodejs12/root/usr/bin/node" "/opt/rh/rh-nodejs12/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/bin/node-gyp.js" "rebuild"
Β  | gyp ERR! cwd /opt/app-root/src/node_modules/msnodesqlv8
Β  | gyp ERR! node -v v12.16.1
Β  | gyp ERR! node-gyp -v v5.0.5
Β  | gyp ERR! not ok

`
I am not getting this error while installing it on my local system(windows os), but I am getting this while deploying the code in linux environment. Node of the other npm packages are giving this type of error.

problem with installing itypescript

when i want install itypescript package i get this erorr:

➜  ~ sudo npm install -g itypescript
[sudo] password for ali: 
/home/ali/bin/its -> /home/ali/lib/node_modules/itypescript/bin/itypescript.js
/home/ali/bin/itskernel -> /home/ali/lib/node_modules/itypescript/lib/kernel.js

> [email protected] install /home/ali/lib/node_modules/itypescript/node_modules/zeromq
> node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)


prebuild-install WARN install EACCES: permission denied, access '/home/ali/.npm'

internal/fs/utils.js:230
    throw err;
    ^

Error: EACCES: permission denied, mkdir '/home/ali/lib/node_modules/itypescript/node_modules/zeromq/zmq'
    at Object.mkdirSync (fs.js:840:3)
    at Object.<anonymous> (/home/ali/lib/node_modules/itypescript/node_modules/zeromq/scripts/preinstall.js:89:8)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
    at internal/main/run_main_module.js:18:47 {
  errno: -13,
  syscall: 'mkdir',
  code: 'EACCES',
  path: '/home/ali/lib/node_modules/itypescript/node_modules/zeromq/zmq'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ali/.npm/_logs/2020-04-07T11_51_10_832Z-debug.log

node : v12
npm : v6
os : ubuntu18.04

Support non global jupyter command (configurable jupyter binary command)?

Hi, sorry if this is already supported and described in somewhere else.

Does the itypescript library support invoking jupyter with some other command than jupyter? Namely, I usually handle jupyter library installation by pipenv (fwiw, it's the local npm configuration/installation-ish library for python), and invoke jupyter via pipenv run jupyter.

I think it would be nice if jupyter command can be changed and can be configured e.g. as the command line argument.

Import statement for local modules

There's a problem for transpiling local typescript files.

  • its reads local javascript modules
  • its reads installed javascript packages
  • its CANNOT read local typescript modules

import statements do not seem to be working still. Not sure what the issue is.
To replicate. Create ./test.ts in the same directory as your notebook.

export const test = 'test'

and in your notebook, if you try and import * as test from './test'; and then log out test.test. You'll get an error saying Can not find module './test'`.

  • I don't seem to be able to import node core modules such as fs. Even though I've installed @types/node locally.

Originally posted by @zya in #6 (comment)

Dysfunctional

A simple test installing on Anaconda causes virtually every example to fail. It's not sufficient to simply copy files and rename a few things:

  1. $TS command don't work
  2. imports/modules don't appear to work
  3. Writing a class works but only so long as it doesn't inherit from another class
  4. Syntax highlighting appears broken
  5. TypeScript 2.8 (which is what the Kernel is targeting) has numerous features that are apparently ignored.

This project seems questionable to me and really just a clone with little effort invested in a properly working implementation.

Windows Installation issues

This is the error I get: I can see VS2015 tools seem to be a prerequisite but surely these can be part of the installer?

ols for Visual Studio 2015 (Platform Toolset = 'v140') cannot be found. To build using the v140 build tools, please install Visual Studio 2015 build t
ools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting 
 "Retarget solution". [C:\Users\<<my username>>\AppData\Roaming\npm\node_modules\itypescript\node_modules\zeromq\build\zmq.vcxproj]```

Help wanted: Finding a new owner.

Thank you all for using ITypescript even though I didn't manage it well.
First of all, I'm very sorry for the delay in the update.

I write this issue because I think it is better to transfer ownership to someone else who can update this repository.

When I first uploaded this repository, I didn't know that this many people would use ITypescript. So I believed I could manage it by myself in my leisure time.

But things have changed. I don't use Typescript anymore, so I became paying less attention to ITypescript than before. To make ITypescript better, hence, I concluded that this repository needs someone else to fix listed issues.

Currently, I'm considering 'ownership transfer.' ITypescript should be managed by better people who can pay more attention to it than me. If anyone is interested in developing and updating this repository, please leave a reply. Then, I can transfer the ownership of the repository to the person or organization who replied.

Or, if you have any better options, please leave a comment here.

Once again, thank you for using ITypescript, and sorry for the unhandled issues.

Python 3 support?

When I try to install iTypeScript under mac, I got the following error

Succesfully build libzmq on Fri Aug 04 2017 11:34:09 GMT-0500 (CDT)
gyp ERR! configure error
gyp ERR! stack Error: Python executable "/Users/bpeng1/anaconda/bin/python" is v3.5.2, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack     at failPythonVersion (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:406:14)
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:395:9
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:204:7)
gyp ERR! stack     at emitTwo (events.js:100:13)
gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
gyp ERR! stack     at maybeClose (internal/child_process.js:827:16)
gyp ERR! stack     at Socket.<anonymous> (internal/child_process.js:319:11)
gyp ERR! stack     at emitOne (events.js:90:13)
gyp ERR! stack     at Socket.emit (events.js:182:7)
gyp ERR! stack     at Pipe._onclose (net.js:471:12)
gyp ERR! System Darwin 15.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/itypescript/node_modules/zeromq
gyp ERR! node -v v5.6.0
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok
/usr/local/lib
└── (empty)

which points to this ticket for node-gyp. Does this mean iTypeScript only works with Python2?

Installation failure

I'm installing the itypescript in jupyter/base-notebook docker container.
It seems that it is failing in compiling phase:

root@cab675b6394b:~# npm install -g --unsafe-perm itypescript
/home/node/.npm-global/bin/its -> /home/node/.npm-global/lib/node_modules/itypescript/bin/itypescript.js
/home/node/.npm-global/bin/itskernel -> /home/node/.npm-global/lib/node_modules/itypescript/lib/kernel.js

> [email protected] install /home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq
> node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)


prebuild-install WARN install No prebuilt binaries found (target=13.10.1 runtime=node arch=x64 platform=linux)

Building libzmq for linux
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '0' is supported by ustar format... yes
checking whether GID '0' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether make supports nested variables... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether C compiler accepts -std=gnu11... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking whether g++ supports C++11 features by default... yes
checking for a sed that does not truncate output... /bin/sed
checking whether to build with code coverage support... no
checking for a sed that does not truncate output... (cached) /bin/sed
checking for gawk... (cached) mawk
checking for pkg-config... no
checking for xmlto... no
checking for asciidoc... no
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
./configure: line 9818: /usr/bin/file: No such file or directory
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for valgrind... no
checking whether the C compiler works... yes
checking whether we are using Intel C compiler... no
checking whether we are using Sun Studio C compiler... no
checking whether we are using clang C compiler... no
checking whether we are using gcc >= 4 C compiler... yes
checking whether the C++ compiler works... yes
checking whether we are using Intel C++ compiler... no
checking whether we are using Sun Studio C++ compiler... no
checking whether we are using clang C++ compiler... no
checking whether we are using gcc >= 4 C++ compiler... yes
checking whether to enable debugging information... no
checking whether to enable code coverage... no
checking if TIPC is available and supports nonblocking connect... no
checking for library containing dladdr... -ldl
checking for pthread_create in -lpthread... yes
checking for clock_gettime in -lrt... yes
checking whether C++ compiler supports -fvisibility=hidden... yes
checking whether C++ compiler supports dso visibility... yes
checking whether to build documentation... no
checking whether to install manpages... no
configure: Choosing polling system from 'kqueue epoll devpoll pollset poll select'...
configure: Using 'epoll' polling system with CLOEXEC
checking for ANSI C header files... (cached) yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking for unistd.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking netinet/tcp.h usability... yes
checking netinet/tcp.h presence... yes
checking for netinet/tcp.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking ifaddrs.h usability... yes
checking ifaddrs.h presence... yes
checking for ifaddrs.h... yes
checking sys/uio.h usability... yes
checking sys/uio.h presence... yes
checking for sys/uio.h... yes
checking sys/eventfd.h usability... yes
checking sys/eventfd.h presence... yes
checking for sys/eventfd.h... yes
checking whether EFD_CLOEXEC is supported... yes
checking whether SO_PEERCRED is declared... yes
checking whether LOCAL_PEERCRED is declared... no
checking for stdbool.h that conforms to C99... no
checking for _Bool... no
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for size_t... yes
checking for ssize_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for uint32_t... yes
checking for working volatile... yes
configure: Using tweetnacl for CURVE security
checking "with_norm_ext = no"... no
checking how to enable additional warnings for C++ compiler... -Wall
checking how to turn warnings to errors in C++ compiler... -Werror
checking whether compiler supports __atomic_Xxx intrinsics... yes
checking return type of signal handlers... void
checking for perror... yes
checking for gettimeofday... yes
checking for clock_gettime... yes
checking for memset... no
checking for socket... yes
checking for getifaddrs... yes
checking for freeifaddrs... yes
checking for fork... no
checking for posix_memalign... no
checking for mkdtemp... yes
checking alloca.h usability... yes
checking alloca.h presence... yes
checking for alloca.h... yes
checking whether SOCK_CLOEXEC is supported... yes
checking whether SO_KEEPALIVE is supported... yes
checking whether TCP_KEEPCNT is supported... yes
checking whether TCP_KEEPIDLE is supported... yes
checking whether TCP_KEEPINTVL is supported... yes
checking whether TCP_KEEPALIVE is supported... no
checking for ./.git... no
configure: Building stable and legacy API (no draft API)
checking for LIBUNWIND... no
configure: WARNING: Cannot find libunwind
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/libzmq.pc
config.status: creating doc/Makefile
config.status: creating builds/Makefile
config.status: creating builds/msvc/Makefile
config.status: creating src/platform.hpp
config.status: executing depfiles commands
config.status: executing libtool commands
Making all in doc
make[1]: Entering directory '/home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq/zmq/zeromq-4.2.2/doc'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq/zmq/zeromq-4.2.2/doc'
make[1]: Entering directory '/home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq/zmq/zeromq-4.2.2'
  CXX      src/src_libzmq_la-address.lo
  CXX      src/src_libzmq_la-client.lo
  CXX      src/src_libzmq_la-clock.lo
  CXX      src/src_libzmq_la-ctx.lo
  CXX      src/src_libzmq_la-curve_client.lo
  CXX      src/src_libzmq_la-curve_server.lo
  CXX      src/src_libzmq_la-dealer.lo
  CXX      src/src_libzmq_la-devpoll.lo
  CXX      src/src_libzmq_la-dgram.lo
  CXX      src/src_libzmq_la-dish.lo
  CXX      src/src_libzmq_la-dist.lo
  CXX      src/src_libzmq_la-epoll.lo
  CXX      src/src_libzmq_la-err.lo
  CXX      src/src_libzmq_la-fq.lo
  CXX      src/src_libzmq_la-gather.lo
  CXX      src/src_libzmq_la-gssapi_mechanism_base.lo
  CXX      src/src_libzmq_la-gssapi_client.lo
  CXX      src/src_libzmq_la-gssapi_server.lo
  CXX      src/src_libzmq_la-io_object.lo
  CXX      src/src_libzmq_la-io_thread.lo
  CXX      src/src_libzmq_la-ip.lo
  CXX      src/src_libzmq_la-ipc_address.lo
  CXX      src/src_libzmq_la-ipc_connecter.lo
  CXX      src/src_libzmq_la-ipc_listener.lo
  CXX      src/src_libzmq_la-kqueue.lo
  CXX      src/src_libzmq_la-lb.lo
  CXX      src/src_libzmq_la-mailbox.lo
  CXX      src/src_libzmq_la-mailbox_safe.lo
  CXX      src/src_libzmq_la-mechanism.lo
  CXX      src/src_libzmq_la-metadata.lo
  CXX      src/src_libzmq_la-msg.lo
  CXX      src/src_libzmq_la-mtrie.lo
  CXX      src/src_libzmq_la-norm_engine.lo
  CXX      src/src_libzmq_la-null_mechanism.lo
  CXX      src/src_libzmq_la-object.lo
  CXX      src/src_libzmq_la-options.lo
  CXX      src/src_libzmq_la-own.lo
  CXX      src/src_libzmq_la-pair.lo
  CXX      src/src_libzmq_la-pgm_receiver.lo
  CXX      src/src_libzmq_la-pgm_sender.lo
  CXX      src/src_libzmq_la-pgm_socket.lo
  CXX      src/src_libzmq_la-pipe.lo
  CXX      src/src_libzmq_la-plain_client.lo
  CXX      src/src_libzmq_la-plain_server.lo
  CXX      src/src_libzmq_la-poll.lo
  CXX      src/src_libzmq_la-poller_base.lo
  CXX      src/src_libzmq_la-pollset.lo
  CXX      src/src_libzmq_la-precompiled.lo
  CXX      src/src_libzmq_la-proxy.lo
  CXX      src/src_libzmq_la-pub.lo
  CXX      src/src_libzmq_la-pull.lo
  CXX      src/src_libzmq_la-push.lo
  CXX      src/src_libzmq_la-radio.lo
  CXX      src/src_libzmq_la-random.lo
  CXX      src/src_libzmq_la-raw_decoder.lo
  CXX      src/src_libzmq_la-raw_encoder.lo
  CXX      src/src_libzmq_la-reaper.lo
  CXX      src/src_libzmq_la-rep.lo
  CXX      src/src_libzmq_la-req.lo
  CXX      src/src_libzmq_la-router.lo
  CXX      src/src_libzmq_la-scatter.lo
  CXX      src/src_libzmq_la-select.lo
  CXX      src/src_libzmq_la-server.lo
  CXX      src/src_libzmq_la-session_base.lo
  CXX      src/src_libzmq_la-signaler.lo
  CXX      src/src_libzmq_la-socket_base.lo
  CXX      src/src_libzmq_la-socks.lo
  CXX      src/src_libzmq_la-socks_connecter.lo
  CXX      src/src_libzmq_la-stream.lo
  CXX      src/src_libzmq_la-stream_engine.lo
  CXX      src/src_libzmq_la-sub.lo
  CXX      src/src_libzmq_la-tcp.lo
  CXX      src/src_libzmq_la-tcp_address.lo
  CXX      src/src_libzmq_la-tcp_connecter.lo
  CXX      src/src_libzmq_la-tcp_listener.lo
  CXX      src/src_libzmq_la-thread.lo
  CXX      src/src_libzmq_la-timers.lo
  CXX      src/src_libzmq_la-tipc_address.lo
  CXX      src/src_libzmq_la-tipc_connecter.lo
  CXX      src/src_libzmq_la-tipc_listener.lo
  CXX      src/src_libzmq_la-trie.lo
  CXX      src/src_libzmq_la-udp_address.lo
  CXX      src/src_libzmq_la-udp_engine.lo
  CXX      src/src_libzmq_la-v1_decoder.lo
  CXX      src/src_libzmq_la-v2_decoder.lo
  CXX      src/src_libzmq_la-v1_encoder.lo
  CXX      src/src_libzmq_la-v2_encoder.lo
  CXX      src/src_libzmq_la-vmci.lo
  CXX      src/src_libzmq_la-vmci_address.lo
  CXX      src/src_libzmq_la-vmci_connecter.lo
  CXX      src/src_libzmq_la-vmci_listener.lo
  CXX      src/src_libzmq_la-xpub.lo
  CXX      src/src_libzmq_la-xsub.lo
  CXX      src/src_libzmq_la-zmq.lo
  CXX      src/src_libzmq_la-zmq_utils.lo
  CXX      src/src_libzmq_la-decoder_allocators.lo
  CXX      src/src_libzmq_la-socket_poller.lo
  CC       src/src_libzmq_la-tweetnacl.lo
  CXX      tools/curve_keygen.o
  CXX      perf/local_lat.o
  CXX      perf/remote_lat.o
  CXX      perf/local_thr.o
  CXX      perf/remote_thr.o
  CXX      perf/inproc_lat.o
  CXX      perf/inproc_thr.o
  CXXLD    src/libzmq.la
ar: `u' modifier ignored since `D' is the default (see `U')
  CXXLD    tools/curve_keygen
  CXXLD    perf/local_lat
  CXXLD    perf/remote_lat
  CXXLD    perf/local_thr
  CXXLD    perf/remote_thr
  CXXLD    perf/inproc_lat
  CXXLD    perf/inproc_thr
make[1]: Leaving directory '/home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq/zmq/zeromq-4.2.2'
Making install in doc
make[1]: Entering directory '/home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq/zmq/zeromq-4.2.2/doc'
make[2]: Entering directory '/home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq/zmq/zeromq-4.2.2/doc'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Leaving directory '/home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq/zmq/zeromq-4.2.2/doc'
make[1]: Leaving directory '/home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq/zmq/zeromq-4.2.2/doc'
make[1]: Entering directory '/home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq/zmq/zeromq-4.2.2'
make[2]: Entering directory '/home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq/zmq/zeromq-4.2.2'
 /bin/mkdir -p '/home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq/scripts/../zmq/lib'
 /bin/bash ./libtool   --mode=install /usr/bin/install -c   src/libzmq.la '/home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq/scripts/../zmq/lib'
libtool: install: /usr/bin/install -c src/.libs/libzmq.lai /home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq/scripts/../zmq/lib/libzmq.la
libtool: install: /usr/bin/install -c src/.libs/libzmq.a /home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq/scripts/../zmq/lib/libzmq.a
libtool: install: chmod 644 /home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq/scripts/../zmq/lib/libzmq.a
libtool: install: ranlib /home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq/scripts/../zmq/lib/libzmq.a
libtool: finish: PATH="/opt/conda/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq/node_modules/.bin:/home/node/.npm-global/lib/node_modules/itypescript/node_modules/.bin:/home/node/.npm-global/lib/node_modules/.bin:/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/node/.npm-global/bin:/sbin" ldconfig -n /home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq/scripts/../zmq/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq/scripts/../zmq/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 /bin/mkdir -p '/home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq/scripts/../zmq/bin'
  /bin/bash ./libtool   --mode=install /usr/bin/install -c tools/curve_keygen '/home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq/scripts/../zmq/bin'
libtool: install: /usr/bin/install -c tools/curve_keygen /home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq/scripts/../zmq/bin/curve_keygen
 /bin/mkdir -p '/home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq/scripts/../zmq/include'
 /usr/bin/install -c -m 644 include/zmq.h include/zmq_utils.h '/home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq/scripts/../zmq/include'
 /bin/mkdir -p '/home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq/scripts/../zmq/lib/pkgconfig'
 /usr/bin/install -c -m 644 src/libzmq.pc '/home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq/scripts/../zmq/lib/pkgconfig'
make[2]: Leaving directory '/home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq/zmq/zeromq-4.2.2'
make[1]: Leaving directory '/home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq/zmq/zeromq-4.2.2'
Succesfully build libzmq on Sat Apr 18 2020 00:13:09 GMT+0000 (Coordinated Universal Time)
make: Entering directory '/home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq/build'
  CXX(target) Release/obj.target/zmq/binding.o
../binding.cc: In member function β€˜void zmq::Socket::NotifyReadReady()’:
../binding.cc:394:73: warning: β€˜v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
     Nan::MakeCallback(this->handle(), callback_v.As<Function>(), 0, NULL);
                                                                         ^
In file included from ../binding.cc:40:0:
../../nan/nan.h:1024:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
../binding.cc: In member function β€˜void zmq::Socket::NotifySendReady()’:
../binding.cc:402:73: warning: β€˜v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
     Nan::MakeCallback(this->handle(), callback_v.As<Function>(), 0, NULL);
                                                                         ^
In file included from ../binding.cc:40:0:
../../nan/nan.h:1024:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
../binding.cc: In member function β€˜void zmq::Socket::MonitorEvent(uint16_t, int32_t, char*)’:
../binding.cc:453:73: warning: β€˜v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
     Nan::MakeCallback(this->handle(), callback_v.As<Function>(), 4, argv);
                                                                         ^
In file included from ../binding.cc:40:0:
../../nan/nan.h:1024:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
../binding.cc: In member function β€˜void zmq::Socket::MonitorError(const char*)’:
../binding.cc:468:73: warning: β€˜v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
     Nan::MakeCallback(this->handle(), callback_v.As<Function>(), 1, argv);
                                                                         ^
In file included from ../binding.cc:40:0:
../../nan/nan.h:1024:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
../binding.cc: In static member function β€˜static void zmq::Socket::UV_BindAsyncAfter(uv_work_t*)’:
../binding.cc:809:70: warning: β€˜v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
     Nan::MakeCallback(Nan::GetCurrentContext()->Global(), cb, 1, argv);
                                                                      ^
In file included from ../binding.cc:40:0:
../../nan/nan.h:1024:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
../binding.cc: In static member function β€˜static void zmq::Socket::UV_UnbindAsyncAfter(uv_work_t*)’:
../binding.cc:888:70: warning: β€˜v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
     Nan::MakeCallback(Nan::GetCurrentContext()->Global(), cb, 1, argv);
                                                                      ^
In file included from ../binding.cc:40:0:
../../nan/nan.h:1024:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
../binding.cc: In static member function β€˜static Nan::NAN_METHOD_RETURN_TYPE zmq::Socket::Sendv(Nan::NAN_METHOD_ARGS_TYPE)’:
../binding.cc:1295:39: error: no matching function for call to β€˜v8::Array::Get(uint32_t&)’
       Local<Object> buf = batch->Get(i).As<Object>();
                                       ^
In file included from ../binding.cc:24:0:
/home/jovyan/.cache/node-gyp/13.10.1/include/node/v8.h:3594:43: note: candidate: v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/jovyan/.cache/node-gyp/13.10.1/include/node/v8.h:3594:43: note:   candidate expects 2 arguments, 1 provided
/home/jovyan/.cache/node-gyp/13.10.1/include/node/v8.h:3597:43: note: candidate: v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/jovyan/.cache/node-gyp/13.10.1/include/node/v8.h:3597:43: note:   candidate expects 2 arguments, 1 provided
../binding.cc:1295:50: error: expected primary-expression before β€˜>’ token
       Local<Object> buf = batch->Get(i).As<Object>();
                                                  ^
../binding.cc:1295:52: error: expected primary-expression before β€˜)’ token
       Local<Object> buf = batch->Get(i).As<Object>();
                                                    ^
../binding.cc:1296:48: error: no matching function for call to β€˜v8::Array::Get(uint32_t)’
       Local<Number> flagsObj = batch->Get(i + 1).As<Number>();
                                                ^
In file included from ../binding.cc:24:0:
/home/jovyan/.cache/node-gyp/13.10.1/include/node/v8.h:3594:43: note: candidate: v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/jovyan/.cache/node-gyp/13.10.1/include/node/v8.h:3594:43: note:   candidate expects 2 arguments, 1 provided
/home/jovyan/.cache/node-gyp/13.10.1/include/node/v8.h:3597:43: note: candidate: v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/jovyan/.cache/node-gyp/13.10.1/include/node/v8.h:3597:43: note:   candidate expects 2 arguments, 1 provided
../binding.cc:1296:59: error: expected primary-expression before β€˜>’ token
       Local<Number> flagsObj = batch->Get(i + 1).As<Number>();
                                                           ^
../binding.cc:1296:61: error: expected primary-expression before β€˜)’ token
       Local<Number> flagsObj = batch->Get(i + 1).As<Number>();
                                                             ^
zmq.target.mk:109: recipe for target 'Release/obj.target/zmq/binding.o' failed
make: *** [Release/obj.target/zmq/binding.o] Error 1
make: Leaving directory '/home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/opt/conda/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:316:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 4.19.76-linuxkit
gyp ERR! command "/opt/conda/bin/node" "/opt/conda/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/node/.npm-global/lib/node_modules/itypescript/node_modules/zeromq
gyp ERR! node -v v13.10.1
gyp ERR! node-gyp -v v5.0.7
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jovyan/.npm/_logs/2020-04-18T00_13_11_349Z-debug.log

Generator not supported

The following simple code won't run in iTypeScript notebook.

function* fib(){
    yield 1;
    yield 2;
    let x1 = 1; 
    let x2 = 2;
    while(true){
        let x = x1 + x2;
        x1 = x2;
        x2 = x;
        yield x;
    }
}

The Error message is as below.

TypeError: Cannot read property 'length' of null
    at /usr/local/lib/node_modules/itypescript/lib/kernel.js:136:40
    at Array.map (<anonymous>)
    at Session.transpile (/usr/local/lib/node_modules/itypescript/lib/kernel.js:134:42)
    at Session._runNow (/usr/local/lib/node_modules/itypescript/node_modules/nel/lib/nel.js:786:39)
    at Session._run (/usr/local/lib/node_modules/itypescript/node_modules/nel/lib/nel.js:756:14)
    at Session.execute (/usr/local/lib/node_modules/itypescript/node_modules/nel/lib/nel.js:880:10)
    at Kernel.execute_request (/usr/local/lib/node_modules/itypescript/node_modules/jp-kernel/lib/handlers_v5.js:116:18)
    at Kernel.onShellMessage (/usr/local/lib/node_modules/itypescript/node_modules/jp-kernel/lib/jp-kernel.js:277:41)
    at Socket.<anonymous> (/usr/local/lib/node_modules/itypescript/node_modules/jmp/index.js:350:17)
    at Socket.emit (events.js:182:13)

Website for samples down

Hey @winnekes :)
Firstly, thanks a lot for your effort!
Secondly, in the usage.md you refer to the ITypescript website, which is offline.
Any recommendations where I can get other samples from?

I use your Typescript kernel in vscode jupyter notebooks. There I have the problem that libraries that are loaded in one code cell aren't available in the next one, which actually makes jupyer notebooks unusable. Console recommends me to add various stuff to my tsconfig file, but that didn't help either.

Best wishes,
Markus

`import module` is not working

I have been struggling to import mongoose into my jupyter notebook with several different errors. I am very new to nodejs and typescript so that could be the reason as I don't understand everything.

Can't parse tsconfig.json but tsc can parse it

Try to put a comment in the tsconfig.json and its will complain. I would agree that it's not valid JSON file but npm/typescript can parse it

{
  "compileOnSave": true,
  "compilerOptions": {
    "lib": [
      "es2017",
      "dom"
    ],
    "outDir": "./build",
    "target": "es6",
    "module": "commonjs",
    "skipLibCheck": true, /* Try to remove it */
    "noImplicitAny": false,
    "allowJs": true,
}

After fixing the comments, I see this:

import mongoose from 'mongoose'

Error: Debug Failure. Unexpected moduleResolution: node
    at Object.resolveModuleName (/Users/umair/.nvm/versions/node/v10.15.1/lib/node_modules/itypescript/node_modules/typescript/lib/typescript.js:26281:37)
    at loader_1 (/Users/umair/.nvm/versions/node/v10.15.1/lib/node_modules/itypescript/node_modules/typescript/lib/typescript.js:86779:99)
    at loadWithLocalCache (/Users/umair/.nvm/versions/node/v10.15.1/lib/node_modules/itypescript/node_modules/typescript/lib/typescript.js:86613:42)
    at resolveModuleNamesWorker (/Users/umair/.nvm/versions/node/v10.15.1/lib/node_modules/itypescript/node_modules/typescript/lib/typescript.js:86780:123)
    at resolveModuleNamesReusingOldState (/Users/umair/.nvm/versions/node/v10.15.1/lib/node_modules/itypescript/node_modules/typescript/lib/typescript.js:87001:24)
    at processImportedModules (/Users/umair/.nvm/versions/node/v10.15.1/lib/node_modules/itypescript/node_modules/typescript/lib/typescript.js:88336:35)
    at findSourceFile (/Users/umair/.nvm/versions/node/v10.15.1/lib/node_modules/itypescript/node_modules/typescript/lib/typescript.js:88140:17)
    at /Users/umair/.nvm/versions/node/v10.15.1/lib/node_modules/itypescript/node_modules/typescript/lib/typescript.js:87993:85
    at getSourceFileFromReferenceWorker (/Users/umair/.nvm/versions/node/v10.15.1/lib/node_modules/itypescript/node_modules/typescript/lib/typescript.js:87960:34)
    at processSourceFile (/Users/umair/.nvm/versions/node/v10.15.1/lib/node_modules/itypescript/node_modules/typescript/lib/typescript.js:87993:13)
$ node --version
v10.15.1
$ nvm --version
0.34.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.