Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to load plugins #3187

Closed
fabiopelosin opened this issue Jan 18, 2017 · 6 comments
Closed

Unable to load plugins #3187

fabiopelosin opened this issue Jan 18, 2017 · 6 comments

Comments

@fabiopelosin
Copy link

I have installed the n1-unsubscribe plugin (https://github.com/colinking/n1-unsubscribe) and the application is unable to load it.

Step to reproduce
  1. Install the application
  2. Configure email accounts
  3. Install the plugin
  4. Wait for dialog confirming installation
Console Log
Failed to load package named 'n1-unsubscribe'
package.coffee:129 ReferenceError: Unknown plugin "transform-async-generator-functions" specified in "base" at 0, attempted to resolve relative to "/Users/fabio/.nylas-mail/packages/n1-unsubscribe/lib"
    at /Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/babel-core/lib/transformation/file/options/option-manager.js:176:17
    at Array.map (native)
    at OptionManager.mergeOptions (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/babel-core/lib/transformation/file/options/option-manager.js:229:36)
    at OptionManager.init (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/babel-core/lib/transformation/file/options/option-manager.js:374:12)
    at File.initOptions (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/babel-core/lib/transformation/file/index.js:216:65)
    at new File (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/babel-core/lib/transformation/file/index.js:139:24)
    at Pipeline.transform (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
    at Object.exports.compile (/Applications/Nylas Mail.app/Contents/Resources/app.asar/src/compile-support/babel.js:50:16)
    at compileFileAtPath (/Applications/Nylas Mail.app/Contents/Resources/app.asar/src/compile-cache.js:56:44)
    at Object.value [as .jsx] (/Applications/Nylas Mail.app/Contents/Resources/app.asar/src/compile-cache.js:146:20)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at require (internal/module.js:20:19)
    at Package.module.exports.Package.requireMainModule (/src/package.coffee:311:21)
    at /src/package.coffee:122:23
    at Package.module.exports.Package.measure (/src/package.coffee:107:13)
    at Package.module.exports.Package.load (/src/package.coffee:116:6)
    at PackageManager.module.exports.PackageManager.loadPackage (/src/package-manager.coffee:524:14)
    at PackageManager.module.exports.PackageManager.loadPackages (/src/package-manager.coffee:503:6)
    at NylasEnvConstructor.module.exports.NylasEnvConstructor.startWindow (/src/nylas-env.coffee:661:15)
    at /src/nylas-env.coffee:679:16
package.coffee:130 Unknown plugin "transform-async-generator-functions" specified in "base" at 0, attempted to resolve relative to "/Users/fabio/.nylas-mail/packages/n1-unsubscribe/lib" ReferenceError: Unknown plugin "transform-async-generator-functions" specified in "base" at 0, attempted to resolve relative to "/Users/fabio/.nylas-mail/packages/n1-unsubscribe/lib"(…)(anonymous function) @ package.coffee:130module.exports.Package.measure @ package.coffee:107module.exports.Package.load @ package.coffee:116module.exports.PackageManager.loadPackage @ package-manager.coffee:524module.exports.PackageManager.loadPackages @ package-manager.coffee:503module.exports.NylasEnvConstructor.startWindow @ nylas-env.coffee:661(anonymous function) @ nylas-env.coffee:679
package.coffee:169 Unknown plugin "transform-async-generator-functions" specified in "base" at 0, attempted to resolve relative to "/Users/fabio/.nylas-mail/packages/n1-unsubscribe/lib"module.exports.Package.activateNow @ package.coffee:169(anonymous function) @ package.coffee:156module.exports.Package.measure @ package.coffee:107module.exports.Package.activate @ package.coffee:154module.exports.PackageManager.activatePackage @ package-manager.coffee:599(anonymous function) @ package-manager.coffee:577module.exports.Config.transact @ config.coffee:480module.exports.PackageManager.activatePackages @ package-manager.coffee:570module.exports.PackageManager.activate @ package-manager.coffee:558module.exports.NylasEnvConstructor.startWindow @ nylas-env.coffee:664(anonymous function) @ nylas-env.coffee:679
package.coffee:170 ReferenceError: Unknown plugin "transform-async-generator-functions" specified in "base" at 0, attempted to resolve relative to "/Users/fabio/.nylas-mail/packages/n1-unsubscribe/lib"
    at /Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/babel-core/lib/transformation/file/options/option-manager.js:176:17
    at Array.map (native)
    at OptionManager.mergeOptions (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/babel-core/lib/transformation/file/options/option-manager.js:229:36)
    at OptionManager.init (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/babel-core/lib/transformation/file/options/option-manager.js:374:12)
    at File.initOptions (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/babel-core/lib/transformation/file/index.js:216:65)
    at new File (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/babel-core/lib/transformation/file/index.js:139:24)
    at Pipeline.transform (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
    at Object.exports.compile (/Applications/Nylas Mail.app/Contents/Resources/app.asar/src/compile-support/babel.js:50:16)
    at compileFileAtPath (/Applications/Nylas Mail.app/Contents/Resources/app.asar/src/compile-cache.js:56:44)
    at Object.value [as .jsx] (/Applications/Nylas Mail.app/Contents/Resources/app.asar/src/compile-cache.js:146:20)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at require (internal/module.js:20:19)
    at Package.module.exports.Package.requireMainModule (/src/package.coffee:311:21)
    at Package.module.exports.Package.activateConfig (/src/package.coffee:178:6)
    at Package.module.exports.Package.activateNow (/src/package.coffee:162:8)
    at /src/package.coffee:156:10
    at Package.module.exports.Package.measure (/src/package.coffee:107:13)
    at Package.module.exports.Package.activate (/src/package.coffee:154:8)
    at PackageManager.module.exports.PackageManager.activatePackage (/src/package-manager.coffee:599:12)
    at /src/package-manager.coffee:577:20
    at Config.module.exports.Config.transact (/src/config.coffee:480:7)
    at PackageManager.module.exports.PackageManager.activatePackages (/src/package-manager.coffee:570:21)
    at PackageManager.module.exports.PackageManager.activate (/src/package-manager.coffee:558:44)
    at NylasEnvConstructor.module.exports.NylasEnvConstructor.startWindow (/src/nylas-env.coffee:664:15)
    at /src/nylas-env.coffee:679:16module.exports.Package.activateNow @ package.coffee:170(anonymous function) @ package.coffee:156module.exports.Package.measure @ package.coffee:107module.exports.Package.activate @ package.coffee:154module.exports.PackageManager.activatePackage @ package-manager.coffee:599(anonymous function) @ package-manager.coffee:577module.exports.Config.transact @ config.coffee:480module.exports.PackageManager.activatePackages @ package-manager.coffee:570module.exports.PackageManager.activate @ package-manager.coffee:558module.exports.NylasEnvConstructor.startWindow @ nylas-env.coffee:664(anonymous function) @ nylas-env.coffee:679
package.coffee:171 Failed to activate package named 'n1-unsubscribe' ReferenceError: Unknown plugin "transform-async-generator-functions" specified in "base" at 0, attempted to resolve relative to "/Users/fabio/.nylas-mail/packages/n1-unsubscribe/lib"
    at /Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/babel-core/lib/transformation/file/options/option-manager.js:176:17
    at Array.map (native)
    at OptionManager.mergeOptions (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/babel-core/lib/transformation/file/options/option-manager.js:229:36)
    at OptionManager.init (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/babel-core/lib/transformation/file/options/option-manager.js:374:12)
    at File.initOptions (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/babel-core/lib/transformation/file/index.js:216:65)
    at new File (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/babel-core/lib/transformation/file/index.js:139:24)
    at Pipeline.transform (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
    at Object.exports.compile (/Applications/Nylas Mail.app/Contents/Resources/app.asar/src/compile-support/babel.js:50:16)
    at compileFileAtPath (/Applications/Nylas Mail.app/Contents/Resources/app.asar/src/compile-cache.js:56:44)
    at Object.value [as .jsx] (/Applications/Nylas Mail.app/Contents/Resources/app.asar/src/compile-cache.js:146:20)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at require (internal/module.js:20:19)
    at Package.module.exports.Package.requireMainModule (/src/package.coffee:311:21)
    at Package.module.exports.Package.activateConfig (/src/package.coffee:178:6)
    at Package.module.exports.Package.activateNow (/src/package.coffee:162:8)
    at /src/package.coffee:156:10
    at Package.module.exports.Package.measure (/src/package.coffee:107:13)
    at Package.module.exports.Package.activate (/src/package.coffee:154:8)
    at PackageManager.module.exports.PackageManager.activatePackage (/src/package-manager.coffee:599:12)
    at /src/package-manager.coffee:577:20
    at Config.module.exports.Config.transact (/src/config.coffee:480:7)
    at PackageManager.module.exports.PackageManager.activatePackages (/src/package-manager.coffee:570:21)
    at PackageManager.module.exports.PackageManager.activate (/src/package-manager.coffee:558:44)
    at NylasEnvConstructor.module.exports.NylasEnvConstructor.startWindow (/src/nylas-env.coffee:664:15)
    at /src/nylas-env.coffee:679:16
Are there any related issues?

A quick research in this repo and in the babel repo didn’t reveal any.

What operating system are you using?

OS X 10.12.2 (16C67)

What version of N1 are you using?

Version 1.0.8 (1.0.8)

--

Bug?

Do you have any third-party plugins installed? If so, which ones?

Unsubscribe

@Arjeno
Copy link

Arjeno commented Jan 18, 2017

Same here on 1.0.8

@jontewks
Copy link

Same issue on 1.0.9, I discovered it while trying to create my own plugin. Repro steps for me

  1. Go to preferences > plugins
  2. Enable dev flags
  3. Once Nylas Mail restarts, go back to preferences > plugins and click create new plugin
  4. Save the new plugin with any name
  5. Open up developer tools
  6. See same error as above

@jstejada
Copy link
Contributor

Thanks for reporting this! We're going to take a look

@miguelrs
Copy link

I had the same issue with a plugin I wrote, and after investigating a bit, I solved it by doing this:

npm install babel-plugin-transform-async-generator-functions --save

I don't really know what that library does or whether that's the correct solution, but it seems to have solved the issue, because the plugin is now working...

@grinich
Copy link
Contributor

grinich commented Jan 26, 2017

This is definitely a bug. @emorikawa for some reason our plugin loader is searching in the plugin-specific node_modules folder for the babel-plugin-transform-async-generator-functions package. Any idea why this would be happening?

jstejada added a commit that referenced this issue Jan 26, 2017
Properly use plugins specified in babelrc.json when using the babel
compiler. #3187
@jstejada
Copy link
Contributor

jstejada commented Jan 26, 2017

hi everyone, thanks for your patience! this has been fixed in bbc54ab and you will be able to install plugins again in our next release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants