andi23rosca / napi-nim Goto Github PK
View Code? Open in Web Editor NEWWrite NodeJS native extensions in Nim
License: MIT License
Write NodeJS native extensions in Nim
License: MIT License
I followed the instructions to install on a Linux/Ubuntu, with Nim 1.6.6, but I get the error in title. (I just changed helloworld
by chatbot
)
I'm using choosenim v.0.7.4. The nimbase.h file is in /home/pcarbonn/.choosenim/toolchains/nim-1.6.6/lib
. How can I set it up so that the compiler can find it ?
> napi-nim main.nim
Hint: used config file '/home/pcarbonn/.choosenim/toolchains/nim-1.6.6/config/nim.cfg' [Conf]
Hint: used config file '/home/pcarbonn/.choosenim/toolchains/nim-1.6.6/config/config.nims' [Conf]
.................................................................
/home/pcarbonn/Documents/repos/chatbot/napi/napibindings.nim(63, 55) Warning: implicit conversion to 'cstring' from a non-const location: name; this will become a compile time error in the future [CStringConv]
Hint: gc: refc; opt: none (DEBUG BUILD, `-d:release` generates faster code)
29404 lines; 0.217s; 39.254MiB peakmem; proj: /home/pcarbonn/Documents/repos/chatbot/main.nim; out: /home/pcarbonn/Documents/repos/chatbot/nimcache/main.json [SuccessX]
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info chdir .
gyp info find Python using Python version 3.7.7 found at "/home/linuxbrew/.linuxbrew/opt/python/bin/python3.7"
gyp http GET https://nodejs.org/download/release/v16.13.1/node-v16.13.1-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v16.13.1/node-v16.13.1-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v16.13.1/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v16.13.1/SHASUMS256.txt
gyp info spawn /home/linuxbrew/.linuxbrew/opt/python/bin/python3.7
gyp info spawn args [
gyp info spawn args '/home/pcarbonn/.nvm/versions/node/v16.13.1/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/home/pcarbonn/Documents/repos/chatbot/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/pcarbonn/.nvm/versions/node/v16.13.1/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/pcarbonn/.cache/node-gyp/16.13.1/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/pcarbonn/.cache/node-gyp/16.13.1',
gyp info spawn args '-Dnode_gyp_dir=/home/pcarbonn/.nvm/versions/node/v16.13.1/lib/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/pcarbonn/.cache/node-gyp/16.13.1/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/home/pcarbonn/Documents/repos/chatbot',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Debug', '-C', 'build' ]
make: Entering directory '/home/pcarbonn/Documents/repos/chatbot/build'
CC(target) Debug/obj.target/main/nimcache/stdlib_digitsutils.nim.o
../nimcache/stdlib_digitsutils.nim.c:4:10: fatal error: nimbase.h: No such file or directory
4 | #include "nimbase.h"
| ^~~~~~~~~~~
compilation terminated.
make: *** [main.target.mk:122: Debug/obj.target/main/nimcache/stdlib_digitsutils.nim.o] Error 1
make: Leaving directory '/home/pcarbonn/Documents/repos/chatbot/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/pcarbonn/.nvm/versions/node/v16.13.1/lib/node_modules/node-gyp/lib/build.js:201:23)
gyp ERR! stack at ChildProcess.emit (node:events:390:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
gyp ERR! System Linux 5.4.0-122-generic
gyp ERR! command "/home/pcarbonn/.nvm/versions/node/v16.13.1/bin/node" "/home/pcarbonn/.nvm/versions/node/v16.13.1/bin/node-gyp" "rebuild" "--directory=." "--debug"
gyp ERR! cwd /home/pcarbonn/Documents/repos/chatbot
gyp ERR! node -v v16.13.1
gyp ERR! node-gyp -v v9.1.0
gyp ERR! not ok
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.