sql-js / sql-js/sql.js

Error: Cannot find module 'ws'

Aperta
#112 12 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
JavaScript
Stelle
13.7k
Fork
1.1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hi,
I'm using npm to install sql.js. But when watchify try to bundle the app up, it will throw this error:

 Error: Cannot find module 'ws' from 'C:\my_location\node_modules\sql.js\js'

And in the js file, I only have something like this:

var fs = require('fs');
var SQL = require('sql.js');

var filebuffer = fs.readFileSync('../../db/my_db.sqlite');
var _sqlConn = new SQL.Database(filebuffer);

I'm using a Windows 7 laptop

I really don't know how can i solve this, thanks

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Start with the consuming JavaScript entry point and the node_modules/sql.js/js path named in the error; reproduce the npm/watchify bundle and inspect how the ws dependency is resolved. Done means the application bundles without the reported missing-module error.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript, node.js
Ambito
build-system
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.