How do I include apm dependencies in a package's json?


#1

Hi,

I have forked the language-gfm package, so that I can apply pull 154 on its repo. This pull adds a dependency for the language-liquid package, which I have tried to add under "dependencies": in its package.json but this led to the error:

npm ERR! Linux 4.5.5-1-ck                                                                        
npm ERR! argv "/home/fusion809/GitHub/mine/PKGBUILDs/atom-editor-sync/src/atom-1.7.4/apm/node_modules/atom-package-manager/bin/node" "/home/fusion809/GitHub/mine/PKGBUILDs/atom-editor-sync/src/atom-1.7.4/apm/node_modules/atom-package-manager/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/home/fusion809/.atom/.apm/.apmrc" "--userconfig" "/home/fusion809/.atom/.apmrc" "install" "/tmp/d-116427-10185-3ro01p/package.tgz" "--target=0.36.12" "--arch=x64"                             
npm ERR! node v0.10.40                                                                           
npm ERR! npm  v2.13.3                                                                            
npm ERR! code E404                                                                               

npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/language-liquid         
npm ERR! 404                                                                                     
npm ERR! 404 'language-liquid' is not in the npm registry.                                       
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)                 
npm ERR! 404 It was specified as a dependency of 'language-gfm2'                                 
npm ERR! 404                                                                                     
npm ERR! 404 Note that you can also install from a                                               
npm ERR! 404 tarball, folder, http url, or git url.                                              

npm ERR! Please include the following file with any support request:                             
npm ERR!     /home/fusion809/GitHub/mine/PKGBUILDs/atom-editor-sync/src/atom-1.7.4/npm-debug.log 

which, to me, meant that the "dependencies": field is only for NPM dependencies not APM dependencies like language-liquid. Is there some field I should use for Atom dependencies like language-liquid?

Thanks for your time,
Brenton


#2

You want to add another field called package-deps, like so:

"package-deps": [
    "language-liquid"
  ]

#3

No versioning info is required? Like I don’t have to specify the language-liquid version as 0.5.1? Guessing this will automatically get the latest version of language-liquid?


#4

You can define the version in the same way you do for the dependencies[] array, but it’s not required.