jvandemo / jvandemo/generator-angular2-library

Module build failed: Error: Couldn't find preset "es2015" relative to directory

Open
#171 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
740
Forks
116
PR merge metrics
No merged PRs in 30d

Description

#I Created a an Angular 2 Library and using it in another app using npm link locally.

When i tried to build the App i am getting the following error:

```
ERROR in .-components/dist/index.js
Module build failed: Error: Couldn't find preset "es2015" relative to directory "/Users/user1/git-projects/ui-components/dist"
at /Users/user1/git-projects/ui-app/node_modules/babel-core/lib/transformation/file/options/option-manager.js:293:19
at Array.map (native)
at OptionManager.resolvePresets (/Users/user1/git-projects/ui-app/node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20)
at OptionManager.mergePresets (/Users/user1/git-projects/ui-app/node_modules/babel-core/lib/transformation/file/options/option-manager.js:264:10)
at OptionManager.mergeOptions (/Users/user1/git-projects/ui-app/node_modules/babel-core/lib/transformation/file/options/option-manager.js:249:14)
at OptionManager.init (/Users/user1/git-projects/ui-app/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
at File.initOptions (/Users/user1/git-projects/ui-app/node_modules/babel-core/lib/transformation/file/index.js:212:65)
at new File (/Users/user1/git-projects/ui-app/node_modules/babel-core/lib/transformation/file/index.js:135:24)
at Pipeline.transform (/Users/user1/git-projects/ui-app/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
at transpile (/Users/user1/git-projects/ui-app/node_modules/babel-loader/lib/index.js:48:20)
at Object.module.exports (/Users/user1/git-projects/ui-app/node_modules/babel-loader/lib/index.js:163:20)
@ ./compiled/src/app/app.module.ngfactory.ts 50:0-44
@ ./src/main.browser.aot.ts
```

I am not sure what needs to be done for the es2015 preset. As the Yo generated project for the library didn't have any bablerc files or dependencies on babel-core. The only babel packages i see in node_modules are as listed below:

babel-code-frame
babel-generator
babel-messages
babel-runtime
bable-template
bable-traverse
babel-types

-----------------------------
Local Environment Setup:
-----------------------------
Angular Cli: 1.2.7
Node: 7.8.0
Npm: 3.9.3
-----------------------------

Angular Version in Library: 2.4.3

Angular Version in the App (ui-app) : 4.2.4

Thanks

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.