How do I import npm packages in repl.it javascript
ChetanVenkatesh (0)

I have imported the npm package i need via packages.json

Im doing this:
import { Fabric, c8ql } from "jsc8";

getting this error:

Repl.it: Installing fresh packages

evalmachine.<anonymous>:3
import {Fabric} from "jsc8";
       ^

SyntaxError: Unexpected token {
    at new Script (vm.js:79:7)
    at createScript (vm.js:251:10)
    at Object.runInContext (vm.js:284:10)
    at evaluate (/run_dir/repl.js:133:14)
    at ReadStream.<anonymous> (/run_dir/repl.js:116:5)
    at ReadStream.emit (events.js:189:13)
    at addChunk (_stream_readable.js:284:12)
    at readableAddChunk (_stream_readable.js:265:11)
    at ReadStream.Readable.push (_stream_readable.js:220:10)
    at lazyFs.read (internal/fs/streams.js:181:12)
You are viewing a single comment. View All
Answered by vedprad1 (725) [earned 5 cycles]
View Answer
vedprad1 (725)

@ChetanVenkatesh : Great to here that it is working! Could you please mark the answer as correct? Thanks!