mondora / asteroid

An alternative client for a Meteor backend
MIT License
734 stars 101 forks source link

Cannot find module 'ddp.js' #105

Closed rafaelcorreiapoli closed 7 years ago

rafaelcorreiapoli commented 8 years ago

Hello I forked this repo to tell it to use my forked version of ddp.js https://github.com/rafaelcorreiapoli/ddp.js I installed it like this (on my forked asteroid repo):

npm i --save git://github.com/rafaelcorreiapoli/ddp.js.git

but when I run

npm test

It can not find ddp.js

> asteroid@2.0.2 test /home/rafa93br/node/asteroid
> env NODE_ENV=test env NODE_PATH=src mocha --compilers js:babel-core/register --recursive test/unit

module.js:442
    throw err;
    ^

Error: Cannot find module 'ddp.js'
    at Function.Module._resolveFilename (module.js:440:15)
    at Function.Module._load (module.js:388:25)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/rafa93br/node/asteroid/src/base-mixins/ddp.js:12:1)
    at Module._compile (module.js:541:32)
    at loader (/home/rafa93br/node/asteroid/node_modules/babel-register/lib/node.js:146:5)
    at Object.require.extensions.(anonymous function) [as .js] (/home/rafa93br/node/asteroid/node_modules/babel-register/lib/node.js:156:7)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/rafa93br/node/asteroid/src/asteroid.js:4:1)
    at Module._compile (module.js:541:32)
    at loader (/home/rafa93br/node/asteroid/node_modules/babel-register/lib/node.js:146:5)
    at Object.require.extensions.(anonymous function) [as .js] (/home/rafa93br/node/asteroid/node_modules/babel-register/lib/node.js:156:7)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/rafa93br/node/asteroid/test/unit/asteroid.js:6:1)
    at Module._compile (module.js:541:32)
    at loader (/home/rafa93br/node/asteroid/node_modules/babel-register/lib/node.js:146:5)
    at Object.require.extensions.(anonymous function) [as .js] (/home/rafa93br/node/asteroid/node_modules/babel-register/lib/node.js:156:7)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at /home/rafa93br/node/asteroid/node_modules/mocha/lib/mocha.js:220:27
    at Array.forEach (native)
    at Mocha.loadFiles (/home/rafa93br/node/asteroid/node_modules/mocha/lib/mocha.js:217:14)
    at Mocha.run (/home/rafa93br/node/asteroid/node_modules/mocha/lib/mocha.js:469:10)
    at Object.<anonymous> (/home/rafa93br/node/asteroid/node_modules/mocha/bin/_mocha:404:18)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.runMain (module.js:575:10)
    at run (node.js:348:7)
    at startup (node.js:140:9)
    at node.js:463:3
npm ERR! Test failed.  See above for more details.

Is there something I'm missing? I've been able to install packages from forks I did before and it's just not working this time.

My package.json looks like this

{
  "name": "asteroid",
  "version": "2.0.2",
  "description": "Alternative Meteor client",
  "main": "lib/asteroid.js",
  "scripts": {
    "build": "babel src --out-dir lib",
    "clean": "rimraf lib coverage",
    "coverage": "env NODE_ENV=test env NODE_PATH=src babel-node $(npm bin)/isparta cover node_modules/mocha/bin/_mocha -- --recursive test/unit",
    "coveralls": "cat ./coverage/lcov.info | coveralls",
    "dev": "npm test -- --watch",
    "lint": "eslint src test",
    "prepublish": "npm run clean && npm run build",
    "test": "env NODE_ENV=test env NODE_PATH=src mocha --compilers js:babel-core/register --recursive test/unit",
    "start-meteor": "cd test/server/ && meteor",
    "e2e-test": "env NODE_ENV=test env NODE_PATH=src mocha --compilers js:babel-core/register --recursive test/e2e",
    "e2e-dev": "npm run e2e-test -- --watch"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/mondora/asteroid.git"
  },
  "keywords": [
    "ddp",
    "asteroid",
    "meteor"
  ],
  "author": "Paolo Scanferla <paolo.scanferla@mondora.com>",
  "license": "MIT",
  "bugs": {
    "url": "https://github.com/mondora/asteroid/issues"
  },
  "homepage": "https://github.com/mondora/asteroid",
  "devDependencies": {
    "babel-cli": "^6.9.0",
    "babel-core": "^6.9.0",
    "babel-eslint": "^6.0.4",
    "babel-plugin-rewire": "^1.0.0-rc-3",
    "babel-preset-es2015": "^6.9.0",
    "babel-preset-stage-0": "^6.5.0",
    "chai": "^3.5.0",
    "chai-as-promised": "^5.3.0",
    "coveralls": "^2.11.9",
    "eslint": "^2.10.2",
    "faye-websocket": "^0.11.0",
    "isparta": "^4.0.0",
    "mocha": "^2.4.5",
    "sinon": "^1.17.4",
    "sinon-chai": "^2.8.0"
  },
  "dependencies": {
    "ddp.js": "git://github.com/rafaelcorreiapoli/ddp.js.git",
    "lodash.assign": "^4.0.9",
    "wolfy87-eventemitter": "^5.0.0"
  }
}
davidebianchi commented 7 years ago

Hi @rafaelcorreiapoli, if you install ddp.js from github, this should have the compiled package not ignored by git. The main file is lib/ddp.js, that is created with the build of the package with babel.

davidebianchi commented 7 years ago

Closing for inactivity. Please let us know if you’d like to pick it up again, and we can reopen this. Cheers!