How do I import npm packages in repl.it javascript
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)
Voters
In node.js:
If this answer is correct, please check the checkmark on the left side of this message. Thanks and Good Luck!
@vedprad1 Thanks very much - works now!
Cheers!
@ChetanVenkatesh : Great to here that it is working! Could you please mark the answer as correct? Thanks!