Closed 0xd5dc closed 7 years ago
Are you running npm
version 2?
npm -v 3.10.8 node -v 6.9.1
I also tried node v7.3.0 (npm v3.10.10)
none works
okay can you show me your package.json
?
I believe you have a slightly older version.. anyway if that's the case, the fix would be to get the updated package.json from the repo
{
"private": true,
"scripts": {
"prod": "gulp --production",
"dev": "gulp watch"
},
"devDependencies": {
"babel-core": "^6.16.0",
"babel-loader": "^6.2.5",
"babel-preset-es2015": "^6.16.0",
"bootstrap-sass": "^3.3.7",
"eslint-plugin-angular": "^1.3.1",
"gulp": "^3.9.1",
"gulp-concat-sourcemap": "^1.3.1",
"gulp-cssnano": "^2.1.2",
"gulp-filter": "^4.0.0",
"jquery": "^3.1.0",
"laravel-elixir": "^6.0.0-9",
"laravel-elixir-eslint": "^3.0.0",
"laravel-elixir-webpack-official": "^1.0.2",
"lodash": "^4.14.0",
"main-bower-files": "^2.13.1",
"ng-annotate-loader": "^0.1.1",
"sw-precache": "^4.0.0"
}
}
I think it has something to do with webpack
error message:
{ [Error: ./angular/index.main.js
Module build failed: Error: Couldn't find preset "es2015" relative to directory "/home/chex"
at /home/chex/tmp/laravel5-angular-material-starter/node_modules/babel-core/lib/transformation/file/options/option-manager.js:299:19
at Array.map (native)
at OptionManager.resolvePresets (/home/chex/tmp/laravel5-angular-material-starter/node_modules/babel-core/lib/transformation/file/options/option-manager.js:270:20)
at OptionManager.mergePresets (/home/chex/tmp/laravel5-angular-material-starter/node_modules/babel-core/lib/transformation/file/options/option-manager.js:259:10)
at OptionManager.mergeOptions (/home/chex/tmp/laravel5-angular-material-starter/node_modules/babel-core/lib/transformation/file/options/option-manager.js:244:14)
at OptionManager.init (/home/chex/tmp/laravel5-angular-material-starter/node_modules/babel-core/lib/transformation/file/options/option-manager.js:374:12)
at File.initOptions (/home/chex/tmp/laravel5-angular-material-starter/node_modules/babel-core/lib/transformation/file/index.js:216:65)
at new File (/home/chex/tmp/laravel5-angular-material-starter/node_modules/babel-core/lib/transformation/file/index.js:139:24)
at Pipeline.transform (/home/chex/tmp/laravel5-angular-material-starter/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
at transpile (/home/chex/tmp/laravel5-angular-material-starter/node_modules/babel-loader/lib/index.js:38:20)]
message: './angular/index.main.js\nModule build failed: Error: Couldn\'t find preset "es2015" relative to directory "/home/chex"\n at /home/chex/tmp/laravel5-angular-material-starter/node_modules/babel-core/lib/transformation/file/options/option-manager.js:299:19\n at Array.map (native)\n at OptionManager.resolvePresets (/home/chex/tmp/laravel5-angular-material-starter/node_modules/babel-core/lib/transformation/file/options/option-manager.js:270:20)\n at OptionManager.mergePresets (/home/chex/tmp/laravel5-angular-material-starter/node_modules/babel-core/lib/transformation/file/options/option-manager.js:259:10)\n at OptionManager.mergeOptions (/home/chex/tmp/laravel5-angular-material-starter/node_modules/babel-core/lib/transformation/file/options/option-manager.js:244:14)\n at OptionManager.init (/home/chex/tmp/laravel5-angular-material-starter/node_modules/babel-core/lib/transformation/file/options/option-manager.js:374:12)\n at File.initOptions (/home/chex/tmp/laravel5-angular-material-starter/node_modules/babel-core/lib/transformation/file/index.js:216:65)\n at new File (/home/chex/tmp/laravel5-angular-material-starter/node_modules/babel-core/lib/transformation/file/index.js:139:24)\n at Pipeline.transform (/home/chex/tmp/laravel5-angular-material-starter/node_modules/babel-core/lib/transformation/pipeline.js:46:16)\n at transpile (/home/chex/tmp/laravel5-angular-material-starter/node_modules/babel-loader/lib/index.js:38:20)',
showStack: false,
showProperties: true,
plugin: 'webpack-stream',
__safety: { toString: [Function: bound ] } }
UNMET PEER DEPENDENCY laravel-elixir@6.0.0-15
$ npm install
├─┬ babel-preset-es2015@6.18.0
│ ├── babel-plugin-check-es2015-constants@6.8.0
│ ├── babel-plugin-transform-es2015-arrow-functions@6.8.0
│ ├── babel-plugin-transform-es2015-block-scoped-functions@6.8.0
│ ├── babel-plugin-transform-es2015-block-scoping@6.21.0
│ ├─┬ babel-plugin-transform-es2015-classes@6.18.0
│ │ ├── babel-helper-define-map@6.18.0
│ │ ├── babel-helper-function-name@6.18.0
│ │ ├── babel-helper-optimise-call-expression@6.18.0
│ │ └── babel-helper-replace-supers@6.18.0
│ ├── babel-plugin-transform-es2015-computed-properties@6.8.0
│ ├── babel-plugin-transform-es2015-destructuring@6.19.0
│ ├── babel-plugin-transform-es2015-duplicate-keys@6.8.0
│ ├── babel-plugin-transform-es2015-for-of@6.18.0
│ ├── babel-plugin-transform-es2015-function-name@6.9.0
│ ├── babel-plugin-transform-es2015-literals@6.8.0
│ ├── babel-plugin-transform-es2015-modules-amd@6.18.0
│ ├─┬ babel-plugin-transform-es2015-modules-commonjs@6.18.0
│ │ └── babel-plugin-transform-strict-mode@6.18.0
│ ├─┬ babel-plugin-transform-es2015-modules-systemjs@6.19.0
│ │ └── babel-helper-hoist-variables@6.18.0
│ ├── babel-plugin-transform-es2015-modules-umd@6.18.0
│ ├── babel-plugin-transform-es2015-object-super@6.8.0
│ ├─┬ babel-plugin-transform-es2015-parameters@6.21.0
│ │ ├── babel-helper-call-delegate@6.18.0
│ │ └── babel-helper-get-function-arity@6.18.0
│ ├── babel-plugin-transform-es2015-shorthand-properties@6.18.0
│ ├── babel-plugin-transform-es2015-spread@6.8.0
│ ├─┬ babel-plugin-transform-es2015-sticky-regex@6.8.0
│ │ └── babel-helper-regex@6.18.0
│ ├── babel-plugin-transform-es2015-template-literals@6.8.0
│ ├── babel-plugin-transform-es2015-typeof-symbol@6.18.0
│ ├─┬ babel-plugin-transform-es2015-unicode-regex@6.11.0
│ │ └─┬ regexpu-core@2.0.0
│ │ ├── regenerate@1.3.2
│ │ ├── regjsgen@0.2.0
│ │ └─┬ regjsparser@0.1.5
│ │ └── jsesc@0.5.0
│ └─┬ babel-plugin-transform-regenerator@6.21.0
│ └── regenerator-transform@0.9.8
├── UNMET PEER DEPENDENCY laravel-elixir@6.0.0-15
└─┬ ng-annotate-loader@0.1.1
└── source-map@0.5.4
in your bower.json
update "laravel-elixir": "^6.0.0-9"
to "laravel-elixir": "^6.0.0-15"
see if that solves it
I have encountered the same issue while using brunch, and found the cause and solution for this error, because I had a .babelrc file in the root of my directory. 2 ways to fix this: 1 delete ~/.babelrc 2 set babelrc: false
I'm submitting a ...
[x] bug report
[ ] feature request
[ ] support request
[ ] other (Please specify)
Provide information & explanation I followed the instructions on the doc page and it keeps telling me "es2015" is not there. It did not go away after install
npm install --save-dev babel-preset-es2015
Got code samples?