Code Monkey home page Code Monkey logo

Comments (5)

filipecosta90 avatar filipecosta90 commented on June 27, 2024

Hi there @guyroyse , I've created a empty project and used the sample tensor from the readme and it seems to work for me. Do we differ in any of the following versions?:

filipe@filipe-ThinkPad-T490:/tmp/test$ node --version
v14.13.0
filipe@filipe-ThinkPad-T490:/tmp/test$ npm list 
[email protected] /tmp/test
└─┬ [email protected]
  ├─┬ @types/[email protected]
  │ └── @types/[email protected]
  └─┬ [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    └─┬ [email protected]
      └── [email protected] deduped

filipe@filipe-ThinkPad-T490:/tmp/test$ node tensor.js 
AI.TENSORSET result: OK
AI.TENSORGET reply: datatype FLOAT shape [1,2] , data [3,5]

from redisai-js.

filipecosta90 avatar filipecosta90 commented on June 27, 2024

PS: nonetheless, to be sure, I can add the Readme examples to the CI as part of clean independent examples ( each of them ). wdyt?

from redisai-js.

guyroyse avatar guyroyse commented on June 27, 2024

That certainly couldn't hurt. I checked my version and stuff to compare and upgraded my Node from 12 to 14. But, still getting the error. This is really weird:

14:55:01 [email protected] ~/code/redisai-syntax-error 
🐵 node server.js 
/Users/guyroyse/code/redisai-syntax-error/node_modules/redisai-js/lib/tensor.js:49
    });
    ^

SyntaxError: Unexpected token '}'
    at wrapSafe (internal/modules/cjs/loader.js:979:16)
    at Module._compile (internal/modules/cjs/loader.js:1027:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/Users/guyroyse/code/redisai-syntax-error/node_modules/redisai-js/lib/index.js:10:16)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
14:55:13 [email protected] ~/code/redisai-syntax-error 
🐵 node --version
v14.15.4
14:55:18 [email protected] ~/code/redisai-syntax-error 
🐵 npm list
[email protected] /Users/guyroyse/code/redisai-syntax-error
└─┬ [email protected]
  ├─┬ @types/[email protected]
  │ └── @types/[email protected]
  └─┬ [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    └─┬ [email protected]
      └── [email protected] deduped

How did you install Node? I'm using nvm.

Note: Yes. I have a monkey in my command prompt. ;)

from redisai-js.

simonprickett avatar simonprickett commented on June 27, 2024

I am able to reproduce @guyroyse findings using Mac OS Catalina 10.15.7 and Node 14.16.0, here's my output:

$ node server.js
/Users/simonprickett/source/github/redisai-syntax-error/node_modules/redisai-js/lib/tensor.js:49
    });
    ^

SyntaxError: Unexpected token '}'
    at wrapSafe (internal/modules/cjs/loader.js:979:16)
    at Module._compile (internal/modules/cjs/loader.js:1027:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/Users/simonprickett/source/github/redisai-syntax-error/node_modules/redisai-js/lib/index.js:10:16)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
redisai-syntax-error $ vi /Users/simonprickett/source/github/redisai-syntax-error/node_modules/redisai-js/lib/tensor.js

from redisai-js.

guyroyse avatar guyroyse commented on June 27, 2024

I am running macOS Catalina 10.15.7 as well. I also experienced this same problem on an earlier Mac.

from redisai-js.

Related Issues (11)

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.