Menu

#149 Transition to npm

v1.3.0
closed
nobody
2016-08-07
2016-08-06
Anonymous
No

Originally created by: birkskyum

This pull request enable the new npm integration that came with Meteor 1.3. It isn't trivial because the packages that used to be loaded by meteor now needs an extra 'require()' - touching almost all files in the repo. Fixes [#37]

Procedure

Activate "ecmascript" package to enable npm

Remove meteorhacks:npm and npm-container and use the new npm integration instead.

Load the following packages directly from npm:

  • "bootstrap-filestyle": "^1.2.1",
  • "cheerio": "0.20.0",
  • "clipboard": "^1.5.12",
  • "codemirror": "^5.17.0",
  • "datatables.net": "^1.10.12",
  • "datatables.net-bs": "^1.10.12",
  • "datatables.net-buttons": "^1.2.2",
  • "datatables.net-buttons-bs": "^1.2.2",
  • "datatables.net-responsive": "^2.1.0",
  • "datatables.net-responsive-bs": "^2.1.0",
  • "jquery": "^2.2.0",
  • "jsoneditor": "^5.5.6",
  • "ladda": "^1.0.0",
  • "meteor-node-stubs": "^0.2.3",
  • "mongodb": "2.1.18",
  • "mongodb-backup": "1.6.3",
  • "mongodb-restore": "1.5.4",
  • "spin.js": "^2.3.2",
  • "toastr": "^2.1.2",
  • "tunnel-ssh": "2.1.1",
  • "winston": "2.2.0"

This pr takes another, more careful, approach to achieving the same as [#138] without installing any 3rd-party atmosphere packages. I have checked that any of the visual errors found in that pull request doesn't exist here.

@rsercano Could you check that everything looks like it's supposed to?

Related

Tickets: #138
Tickets: #37

Discussion

  • Anonymous

    Anonymous - 2016-08-06

    Originally posted by: rsercano

    Hi Birk,

    unfortunately I couldn't make that work, I just typed npm install before meteor command, am I doing something wrong ?

    Here are the logs:

    W20160806-22:53:11.912(3)? (STDERR) 
    W20160806-22:53:12.074(3)? (STDERR) D:\Calismalar\Meteor\mongoclient-PR149\node_modules\fibers\fibers.js:16
    W20160806-22:53:12.074(3)? (STDERR)     throw new Error('`'+ modPath+ '.node` is missing. Try reinstalling `node-fibe
    W20160806-22:53:12.075(3)? (STDERR)           ^
    W20160806-22:53:12.075(3)? (STDERR) Error: `D:\Calismalar\Meteor\mongoclient-PR149\node_modules\fibers\bin\win32-ia32-v8-3.14\fibers.node` is missing. Try reinstalling `node-fibers`?
    W20160806-22:53:12.075(3)? (STDERR)     at Object.<anonymous> (D:\Calismalar\Meteor\mongoclient-PR149\node_modules\fibers\fibers.js:16:8)
    W20160806-22:53:12.075(3)? (STDERR)     at Module._compile (module.js:456:26)
    W20160806-22:53:12.075(3)? (STDERR)     at Object.Module._extensions..js (module.js:474:10)
    W20160806-22:53:12.075(3)? (STDERR)     at Module.load (module.js:356:32)
    W20160806-22:53:12.075(3)? (STDERR)     at Function.Module._load (module.js:312:12)
    W20160806-22:53:12.076(3)? (STDERR)     at Module.require (module.js:364:17)
    W20160806-22:53:12.076(3)? (STDERR)     at require (module.js:380:17)
    W20160806-22:53:12.076(3)? (STDERR)     at Object.<anonymous> (D:\Calismalar\Meteor\mongoclient-PR149\.meteor\local\build\programs\server\boot.js:1:75)
    W20160806-22:53:12.077(3)? (STDERR)     at Module._compile (module.js:456:26)
    W20160806-22:53:12.077(3)? (STDERR)     at Object.Module._extensions..js (module.js:474:10)
    => Exited with code: 8
    
     
  • Anonymous

    Anonymous - 2016-08-06

    Originally posted by: birkskyum

    Try to run meteor npm install instead. The version of npm bundled with meteor might be different from the one you have installed.

    You can compare: npm -v and meteor npm -v

     
  • Anonymous

    Anonymous - 2016-08-06

    Originally posted by: rsercano

    Oh, sorry... Tried it and now throwing chimp dependency errors such as: (this can be about windows distribution, don't know really)

    npm ERR! git clone C:\Users\RSercan\AppData\Roaming\npm-cache\_git-remotes\git-github-com-xolvio-cucumber-js-git-v0-9-4-chimp-2-26e1b4f2 C:\Users\RSercan\AppData\Local\Temp\npm-8404-4
    0cb9090\git-cache-3412d1a4\98bc4d7f62664acbeb867b20add16454cbd939ee: Cloning into 'C:\Users\RSercan\AppData\Local\Temp\npm-8404-40cb9090\git-cache-3412d1a4\98bc4d7f62664acbeb867b20add
    16454cbd939ee'...
    npm ERR! git clone C:\Users\RSercan\AppData\Roaming\npm-cache\_git-remotes\git-github-com-xolvio-cucumber-js-git-v0-9-4-chimp-2-26e1b4f2 C:\Users\RSercan\AppData\Local\Temp\npm-8404-4
    0cb9090\git-cache-3412d1a4\98bc4d7f62664acbeb867b20add16454cbd939ee: error: cannot spawn sh: No such file or directory
    npm ERR! git clone C:\Users\RSercan\AppData\Roaming\npm-cache\_git-remotes\git-github-com-xolvio-cucumber-js-git-v0-9-4-chimp-2-26e1b4f2 C:\Users\RSercan\AppData\Local\Temp\npm-8404-4
    0cb9090\git-cache-3412d1a4\98bc4d7f62664acbeb867b20add16454cbd939ee: fatal: unable to fork
    npm ERR! git clone C:\Users\RSercan\AppData\Roaming\npm-cache\_git-remotes\git-github-com-xolvio-cucumber-js-git-v0-9-4-chimp-2-26e1b4f2 C:\Users\RSercan\AppData\Local\Temp\npm-8404-4
    0cb9090\git-cache-3412d1a4\98bc4d7f62664acbeb867b20add16454cbd939ee:
    [      ............] \ fetchMetadata: ERR! git clone C:\Users\RSercan\AppData\Roaming\npm-cache\_git-remotes\git-github-com-xolvio-cucumber-js-git-v0-9-4-chimp-2-26e1b4f2 C:\Users\RS
    [      ............] - fetchMetadata: ERR! git clone C:\Users\RSercan\AppData\Roaming\npm-cache\_git-remotes\git-github-com-xolvio-cucumber-js-git-v0-9-4-chimp-2-26e1b4f2 C:\Users\RS
    
    npm WARN addRemoteGit Error: Command failed: 
    npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:658:15)
    npm WARN addRemoteGit     at ChildProcess.emit (events.js:98:17)
    npm WARN addRemoteGit     at maybeClose (child_process.js:766:16)
    npm WARN addRemoteGit     at Process.ChildProcess._handle.onexit (child_process.js:833:5)
    npm WARN addRemoteGit  xolvio/cucumber-js#v0.9.4-chimp.2 resetting remote C:\Users\RSercan\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-xolvio-cucumber-js-git-v0-9-4-ch
    imp-2-27f37183 because of error: { [Error: Command failed: ] killed: false, code: 1, signal: null }
    [      ............] | fetchMetadata: WARN addRemoteGit Error: Command failed:
    
    npm ERR! git clone --template=C:\Users\RSercan\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror https://github.com/xolvio/cucumber-js.git C:\Users\RSercan\AppData\Roaming\np
    m-cache\_git-remotes\git-https-github-com-xolvio-cucumber-js-git-v0-9-4-chimp-2-27f37183: Cloning into bare repository 'C:\Users\RSercan\AppData\Roaming\npm-cache\_git-remotes\git-htt
    ps-github-com-xolvio-cucumber-js-git-v0-9-4-chimp-2-27f37183'...
    npm ERR! git clone --template=C:\Users\RSercan\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror https://github.com/xolvio/cucumber-js.git C:\Users\RSercan\AppData\Roaming\np
    m-cache\_git-remotes\git-https-github-com-xolvio-cucumber-js-git-v0-9-4-chimp-2-27f37183: fatal: Unable to find remote helper for 'https'
    [      ............] / fetchMetadata: ERR! git clone --template=C:\Users\RSercan\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror https://github.com/xolvio/cucumber-js.git
    
    npm WARN addRemoteGit Error: Command failed: 
    npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:658:15)
    npm WARN addRemoteGit     at ChildProcess.emit (events.js:98:17)
    npm WARN addRemoteGit     at maybeClose (child_process.js:766:16)
    npm WARN addRemoteGit     at Process.ChildProcess._handle.onexit (child_process.js:833:5)
    npm WARN addRemoteGit  xolvio/cucumber-js#v0.9.4-chimp.2 resetting remote C:\Users\RSercan\AppData\Roaming\npm-cache\_git-remotes\git-github-com-xolvio-cucumber-js-git-v0-9-4-chimp-2-
    743e0f86 because of error: { [Error: Command failed: ] killed: false, code: 1, signal: null }
    [      ............] \ fetchMetadata: WARN addRemoteGit Error: Command failed:
    

    Now I'm trying to remove chimp dependency and test, but chimp is necessary for travis build (not mandatory can find another workaround, since there're no tests yet.)

     
  • Anonymous

    Anonymous - 2016-08-06

    Originally posted by: birkskyum

    Ah, then try this meteor npm install fibers --save

     
  • Anonymous

    Anonymous - 2016-08-06

    Originally posted by: birkskyum

    Actually, could you try removing chimp? It's causing a lot of trouble for an unused package at this point.

     
  • Anonymous

    Anonymous - 2016-08-06

    Originally posted by: rsercano

    Indeed, will do that and try again

     
  • Anonymous

    Anonymous - 2016-08-06

    Originally posted by: rsercano

    I don't know what's wrong but cant make meteor command work on Monogclient's directory now. Will try that tomorrow morning again it can be about windows, but I'm not sure. Getting error "The system cannot find the path specified" only on Mongoclient directory somehow when I run meteor command

     
  • Anonymous

    Anonymous - 2016-08-06

    Originally posted by: birkskyum

    Is it only when you are in the mongoclient directory, or is it also when you are in other meteor app directories? I tried something similar some time ago, and I ran the meteor installer to fix it.

     
  • Anonymous

    Anonymous - 2016-08-06

    Originally posted by: rsercano

    Only in mongoclient's directory, other than that I'm able to use meteor as usual that happened after meteor npm install I guess. Will do that thanks a lot, still I need to uninstall meteor from windows before starting installer

     
  • Anonymous

    Anonymous - 2016-08-07

    Originally posted by: rsercano

    Hello Birk,

    I've just made it work by reinstalling meteor. This seems great, but still there are some issues. First of all could you please remove chimp from your fork as well.

    Secondly, some buttons seem to be get smaller somehow. (User management refresh, dump/restore, easy edit etc...) Could you please have a look at it ?

    Finally, again autocomplete is not working, expect these PR seems really cool. And I'll accept this PR asap.

     
  • Anonymous

    Anonymous - 2016-08-07

    Originally posted by: birkskyum

    Could you give me an example of the autocomplete issue? I'm not sure where it is.

     
  • Anonymous

    Anonymous - 2016-08-07

    Originally posted by: rsercano

    As soon as you enable it from settings and connect to a database, you should be able to use autocomplete on find/findOne query or more generally where ever you see Selector field. Oh with the keys CTRL+SPACE

     
  • Anonymous

    Anonymous - 2016-08-07

    Originally posted by: birkskyum

    The tests will break from now on because chimp is removed, but the three issues you found should be fixed now.

     
  • Anonymous

    Anonymous - 2016-08-07

    Originally posted by: rsercano

    Checking them now, thank you !

     
  • Anonymous

    Anonymous - 2016-08-07

    Originally posted by: rsercano

    I still cant use autocomplete, am I missing something ?

     
  • Anonymous

    Anonymous - 2016-08-07

    Originally posted by: birkskyum

    Weird. It's working fine here now. Does the console tell you anything?

     
  • Anonymous

    Anonymous - 2016-08-07

    Originally posted by: rsercano

    Unfortunately no, will check again

     
  • Anonymous

    Anonymous - 2016-08-07

    Originally posted by: birkskyum

    Does the code folding work if you write the following?

    {
    
    }
    
     
  • Anonymous

    Anonymous - 2016-08-07

    Originally posted by: rsercano

    No, not really, tried to clear cache, but no chance

     
  • Anonymous

    Anonymous - 2016-08-07

    Originally posted by: birkskyum

    Are the 'if' and 'return' colored blue if you insert the following in the findOne query field?

    if (test) {
      return;
    }
    
     
  • Anonymous

    Anonymous - 2016-08-07

    Originally posted by: birkskyum

    If they are not blue, then please double-check that you have pulled the last of my commits called:
    Load addons (eg. autocomplete) and theme for codemirror

     
  • Anonymous

    Anonymous - 2016-08-07

    Originally posted by: rsercano

    Oh I'm truly sorry, you're a star it's working like a charm. Dumb me forgotten last pull. Accepting this PR now and will find a workaround for travis soon.

     
  • Anonymous

    Anonymous - 2016-08-07

    Ticket changed by: rsercano

    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB