Failed to load package


#1

I have developed simple snippet package https://github.com/p10ns11y/atom-react-intl-snippets

Could anyone tell me where if something I am missing ?

if I just paste this in Atom snippets directly, snippets working fine. If I install the package it seems working also. But I get the following message when I open atom and after installing

Unexpected token :

SyntaxError: Unexpected token :
  at Module._compile (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:77:42)
  at Object.value [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:201:21)
  at Module.load (module.js:473:32)
  at tryModuleLoad (module.js:432:12)
  at Function.Module._load (module.js:424:3)
  at Module.require (module.js:483:17)
  at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27)
  at Package.module.exports.Package.requireMainModule (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:747:27)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/package.js:118:28
  at Package.module.exports.Package.measure (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:92:15)
  at Package.module.exports.Package.load (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:106:12)
  at PackageManager.module.exports.PackageManager.loadPackage (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:468:14)
  at PackageManager.module.exports.PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:548:30)
  at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/settings-view/lib/package-manager.js:439:29
  at exit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/settings-view/lib/package-manager.js:73:16)
  at triggerExitCallback (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:215:47)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:222:18
  at Socket.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:100:18)
  at emitOne (events.js:101:20)
  at Socket.emit (events.js:188:7)
  at Pipe._handle.close [as _onclose] (net.js:493:12)

#2

You list main here:

The main attribute in your package.json is for launching the main code module of your package. Since your package offers only snippets and no code, you shouldn’t have a main attribute in your package.json.


#3

@leedohm: Thanks a lot! I earlier had pull path "main": "./snippets/react-intl.cson" and that caused a problem. After I removed react-intl.cson the problem has gone. Yes it make sense not to have main I will remove it.