Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • S sweet-core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 62
    • Issues 62
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • sweet-js
  • sweet-core
  • Issues
  • #510
Closed
Open
Issue created Mar 27, 2016 by Administrator@rootContributor

Requirement for manual install of babel-preset-es2015

Created by: andreypopp

Babel is configured to run with es2015 preset but no dependency is declared in sweet.js package.

That results in:

mb % ./node_modules/.bin/sjs ./test.js                                                                                                                  ~/Workspace/sweet-playground
/Users/andreypopp/Workspace/sweet-playground/node_modules/babel-core/lib/transformation/file/options/option-manager.js:372
          throw new Error("Couldn't find preset " + JSON.stringify(val) + " relative to directory " + JSON.stringify(dirname));
          ^

Error: Couldn't find preset "es2015" relative to directory "/Users/andreypopp/Workspace/sweet-playground"
    at /Users/andreypopp/Workspace/sweet-playground/node_modules/babel-core/lib/transformation/file/options/option-manager.js:372:17
    at Array.map (native)
    at OptionManager.resolvePresets (/Users/andreypopp/Workspace/sweet-playground/node_modules/babel-core/lib/transformation/file/options/option-manager.js:364:20)
    at OptionManager.mergePresets (/Users/andreypopp/Workspace/sweet-playground/node_modules/babel-core/lib/transformation/file/options/option-manager.js:348:10)
    at OptionManager.mergeOptions (/Users/andreypopp/Workspace/sweet-playground/node_modules/babel-core/lib/transformation/file/options/option-manager.js:307:14)
    at OptionManager.init (/Users/andreypopp/Workspace/sweet-playground/node_modules/babel-core/lib/transformation/file/options/option-manager.js:465:10)
    at File.initOptions (/Users/andreypopp/Workspace/sweet-playground/node_modules/babel-core/lib/transformation/file/index.js:194:75)
    at new File (/Users/andreypopp/Workspace/sweet-playground/node_modules/babel-core/lib/transformation/file/index.js:123:22)
    at Pipeline.transform (/Users/andreypopp/Workspace/sweet-playground/node_modules/babel-core/lib/transformation/pipeline.js:45:16)
    at Object.compile (/Users/andreypopp/Workspace/sweet-playground/node_modules/sweet.js/dist/sweet.js:79:70)

I think the the right fix would be to remove es2015 preset configuration and let users configure Babel themselves (via .babelrc or "babel" key in package.json).

Assignee
Assign to
Time tracking