Cannot find module './transforms/babel-plugin-convert-existence-checks-to-macros' - ember.js

I've recently updated ember-cli and my app to 4.10.0, and trying to build with:
ember serve
throws the following error:
Cannot find module './transforms/babel-plugin-convert-existence-checks-to-macros'
I've looked to see what module is missing. I came up with trying to install/reinstall ember-cli-babel and that didn't work either.
The ember app is on LAMP: Raspbian Linux 11 OS, Apache 2.4.54, MariaDB 10.5.15, and PHP/Laravel 8 backend
ember-cli: 4.10.0
ember-source: 4.10.0
ember-cli-babel: 7.26.11
I don't have any special ember-cli-build configurations, here it is:
'use strict';
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function(defaults) {
const app = new EmberApp(defaults, {
});
return app.toTree();
}
EDIT: ERROR STACK
- name: Error
- nodeAnnotation: [undefined]
- nodeName: [undefined]
- originalErrorMessage: [undefined]
- stack: Error: Cannot find module './transforms/babel-plugin-convert-existence-checks-to-macros'
Require stack:
- /var/www/html/.../node_modules/#ember-data/private-build-infra/src/debug-macros.js
- /var/www/html/.../node_modules/#ember-data/private-build-infra/src/stripped-build-plugins.js
- /var/www/html/.../node_modules/#ember-data/private-build-infra/src/addon-build-config-for-data-package.js
- /var/www/html/.../node_modules/ember-data/index.js
- /var/www/html/.../node_modules/ember-cli/lib/models/package-info-cache/package-info.js
- /var/www/html/.../node_modules/ember-cli/lib/models/package-info-cache/index.js
- /var/www/html/.../node_modules/ember-cli/lib/models/project.js
- /var/www/html/.../node_modules/ember-cli/lib/utilities/get-config.js
- /var/www/html/.../node_modules/ember-cli/lib/utilities/instrumentation.js
- /var/www/html/.../node_modules/ember-cli/lib/cli/index.js
- /usr/local/lib/node_modules/ember-cli/bin/ember
at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
at Function.resolve (node:internal/modules/cjs/helpers:109:19)
at debugMacros (/var/www/html/.../node_modules/#ember-data/private-build-infra/src/debug-macros.js:6:44)
at module.exports (/var/www/html/.../node_modules/#ember-data/private-build-infra/src/stripped-build-plugins.js:11:48)
at Class.buildBabelOptions (/var/www/html/.../node_modules/#ember-data/private-build-infra/src/addon-build-config-for-data-package.js:149:62)
at Class._setupBabelOptions (/var/www/html/.../node_modules/#ember-data/private-build-infra/src/addon-build-config-for-data-package.js:168:33)
at Class.included (/var/www/html/.../node_modules/#ember-data/private-build-infra/src/addon-build-config-for-data-package.js:184:12)
at Class.superWrapper [as included] (/var/www/html/.../node_modules/core-object/lib/assign-properties.js:34:20)
at /var/www/html/.../node_modules/ember-cli/lib/models/addon.js:497:26
at Array.reduce (<anonymous>)
at Class.eachAddonInvoke (/var/www/html/.../node_modules/ember-cli/lib/models/addon.js:494:24)
at Class.included (/var/www/html/.../node_modules/ember-cli/lib/models/addon.js:769:10)
at Class.superWrapper [as included] (/var/www/html/.../node_modules/core-object/lib/assign-properties.js:34:20)
at Class.included (/var/www/html/.../node_modules/#ember-data/private-build-infra/src/addon-build-config-for-data-package.js:174:28)
at Class.superWrapper [as included] (/var/www/html/.../node_modules/core-object/lib/assign-properties.js:34:20)
at /var/www/html/.../node_modules/ember-cli/lib/broccoli/ember-app.js:721:15

After days of googling and trying a variety of things, I was able to get my ember application to launch again. Here is what worked for me, for whatever reason.
I removed all the files inside my projects node_modules directory
sudo rm -r node_modules/*
and reinstalled all those packages with
npm install
After this, and I'm not sure if this really had anything to do with the resolution, I updated npm from 9.4.1 to 9.4.2
npm install -g npm#9.4.2
Once all of those commands executed successfully, I ran
ember serve
and I no longer received the above error.
I hadn't thought I ever used sudo to install any npm packages, at least I try to make it a habit not to. But, it's possible I screwed up during my many butchered attempts at updating my ember app from 4.9 to 4.10.

Related

Solana Anchor Lang: anchor init creates project with TypeError: Cannot read properties of undefined (reading 'methods')

Confused about what could have caused this to stop working, I installed solana and anchor and was able to test projects.
anchor --version anchor-cli 0.26.0
nvm use 16.16.0
Now using node v16.16.0 (npm v8.11.0)
anchor init hello-world
yarn install v1.22.19
warning package.json: No license field
info No lockfile found.
warning No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 6.07s.
Initialized empty Git repository in /home/user/Code/anchor-second-test/hello-world/.git/
hello-world initialized
cd hello-world && anchor build works. Making no changes, I run anchor run test
1) hello-world
Is initialized!:
TypeError: Cannot read properties of undefined (reading 'methods')
at /home/user/Code/anchor-second-test/hello-world/tests/hello-world.ts:13:30
at Generator.next (<anonymous>)
at /home/user/Code/anchor-second-test/hello-world/tests/hello-world.ts:31:71
at new Promise (<anonymous>)
at __awaiter (tests/hello-world.ts:27:12)
at Context.<anonymous> (tests/hello-world.ts:11:36)
at processImmediate (node:internal/timers:466:21)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Here is hello-world.ts test file as generated:
import { Program } from "#project-serum/anchor";
import { HelloWorld } from "../target/types/hello_world";
describe("hello-world", () => {
// Configure the client to use the local cluster.
anchor.setProvider(anchor.AnchorProvider.env());
const program = anchor.workspace.HelloWorld as Program<HelloWorld>;
it("Is initialized!", async () => {
// Add your test here.
const tx = await program.methods.initialize().rpc();
console.log("Your transaction signature", tx);
});
});
I have tried using node lts 16.16.0 instead of the latest lts, starting in a clean directory, checking that typescript was installed, running yarn install before running anchor build command. I checked that the solana keypair and json file was generated in the correct folder.
Go to this ../target/types/hello_world directory and make sure it exports like this
export type HelloWorld = {}
since you have this import
import { HelloWorld } from "../target/types/hello_world";
also, you did not show anchor import . It should be
import * as anchor from "#project-serum/anchor";

TypeError: Cannot read property 'serve:before' of undefined on Ionic CLI 2.2.1 + Gulp 4

I am developing a Web Application that have a lot of legacy dependencies.
On the trial of updating some packages, I updated the gulp/gulpfile.js and tinkered then to run. Gulp was on version 3.5 and now is on 4.0.
By the way, the error thrown in the terminal by running : ionic serve --address localhost --nobrowser is :
Error: spawn cordova EACCES
at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
Mind letting us know? https://github.com/driftyco/ionic-cli/issues
******************************************************
Dependency warning - for the CLI to run correctly,
it is highly recommended to install/upgrade the following:
Please update your Cordova CLI to version >=4.2.0 `npm install -g cordova`
******************************************************
TypeError: Cannot read property 'serve:before' of undefined
at Object.runWithGulp (/usr/lib/node_modules/ionic/lib/cli.js:237:17)
at Object.runr (/usr/lib/node_modules/ionic/lib/cli.js:194:18)
at /usr/lib/node_modules/ionic/lib/cli.js:54:9
at _fulfilled (/usr/lib/node_modules/ionic/node_modules/q/q.js:787:54)
at /usr/lib/node_modules/ionic/node_modules/q/q.js:816:30
at Promise.promise.promiseDispatch (/usr/lib/node_modules/ionic/node_modules/q/q.js:749:13)
at /usr/lib/node_modules/ionic/node_modules/q/q.js:557:44
at flush (/usr/lib/node_modules/ionic/node_modules/q/q.js:108:17)
at process._tickCallback (internal/process/next_tick.js:61:11)
Cannot read property 'serve:before' of undefined (CLI v2.2.1)
Your system information:
Cordova CLI: undefined
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 5.4
Node Version: v10.16.3
Xcode version: Not installed
Then, some patch of the gulpfile.js :
gulp.task('build', gulp.series('bundle', 'copyTask', 'revTask', 'revReplaceTask'));
gulp.task('default', gulp.series('sassTask', 'cleanTask', 'build', 'watchTask'));
gulp.task('serve:before', gulp.series('cleanTask', 'watchTask', 'build'));
Before the tinkering, gulp.task('serve:before' [...]) functioned well. I guess it is related with the Ionic 2.2.1 CLI.
If someone could help me by a hint or an advice for mismatching the problem, I would be glad.
This happened to me while I upgraded Node to v12 which forced me to upgrade Gulp to v4.
The solution that worked for me is:
Go to npm\node_modules\ionic\lib\cli.js (Wherever it's located).
Change the following lines as such in cli.js:
237: if (true || gulp.tasks[beforeHook]) {
257: if (true || gulp.tasks[afterHook]) {
270: return Q.nfcall(null/*gulp.start.bind(gulp)*/, hookName)
Basically, the reason is that gulp.tasks and gulp.start don't exist in Gulp v4.
By putting true || in the first occurrences, gulp.tasks won't run and by putting null in the last occurrence, the gulp.start won't run.
I hope this helps the next people that encounter this problem.

Have Error while try to Update Ember 2.14.2 to Ember 2.18.2

Anyone please help me with Ember update.My current code base was 2.14.2 and I try to update 2.18.2.And I got the below error.
Could not start watchman
Visit https://ember-cli.com/user-guide/#watchman for more info.
Cannot find module
'/sampleApp/bower_components/ember/ember-template-compiler.js'
Anyone, please guide me with this. If you have another method to upgrade the version of ember please let me know or please help to solve the issue.
Update
Full stack track:
Log File Source
`ENV Summary:
ERROR Summary:
- broccoliBuilderErrorStack: [undefined]
- code: MODULE_NOT_FOUND
- codeFrame: [undefined]
- errorMessage: Cannot find module
'/Users/mariselvan/Documents/sampleApp/bower_components/ember/ember-
template-compiler.js'
- errorType: [undefined]
- location:
- column: [undefined]
- file: [undefined]
- line: [undefined]
- message: Cannot find module
'/Users/mariselvan/Documents/sampleApp/bower_components/ember/ember-
template-compiler.js'
- name: Error
- nodeAnnotation: [undefined]
- nodeName: [undefined]
- originalErrorMessage: [undefined]
- stack: Error: Cannot find module
'/Users/mariselvan/Documents/sampleApp/bower_components/ember/ember-
template-compiler.js'
at Function.Module._resolveFilename
(internal/modules/cjs/loader.js:580:15)
at Function.Module._load (internal/modules/cjs/loader.js:506:25)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Class.htmlbarsOptions (/Users/mariselvan/Documents/sampleApp/node_modules/ember-inplace-edit/node_modules/ember-cli-htmlbars/ember-addon-main.js:78:25)
at Object.toTree (/Users/mariselvan/Documents/sampleApp/node_modules/ember-inplace-edit/node_modules/ember-cli-htmlbars/ember-addon-main.js:31:36)
at /Users/mariselvan/Documents/sampleApp/node_modules/ember-cli-preprocess-registry/preprocessors.js:180:26
at Array.forEach (<anonymous>)
at processPlugins (/Users/mariselvan/Documents/sampleApp/node_modules/ember-cli-preprocess-registry/preprocessors.js:178:11)
at module.exports.preprocessTemplates (/Users/mariselvan/Documents/sampleApp/node_modules/ember-cli-preprocess-registry/preprocessors.js:161:10)
=================================================================================
Ember-Cli version of the project :
ember-cli: 2.14.2
node: 10.13.0
os: darwin x64
Thanks in advance.
I remember experiencing something like this around the late 2.x of ember. Basically, ember switched from bower to npm around 2.11 or so.
Are you using the ember-source npm version of ember? Your template compiler lookup is searching within bower which is most likely wrong if you've properly made the switch to npm, which you should have!
There's this issue that was fixed which may be the cause for you. Often times, updating the ember
version alone isn't enough. For me, it was always easiest to update to the ember-cli version whose blueprint installed the version of ember that you are wanting (which will help you know what other core dependencies need updating). Looking through old release notes helps here.
If you are using an old ember-cli-htmlbars-inline-precompiler, you need to upgrade to:
"ember-cli-htmlbars-inline-precompile": "^0.3.6"
If it's not either of those, please update your question with the full stack trace and the ember-cli version
EDIT: I'd like to help enable you to solve this issue yourself in the future so here's the detailed breakdown of how I reach my conclusion. In your stack trace, we see:
/Users/mariselvan/Documents/sampleApp/bower_components/ember/ember-
template-compiler.js
This is looking for ember in bower which is no longer the case since you have ember-source in your package.json. This error results from
at Class.htmlbarsOptions (/Users/mariselvan/Documents/sampleApp/node_modules/ember-inplace-edit/node_modules/ember-cli-htmlbars/ember-addon-main.js:78:25)
So the conclusion here is that the version of ember-inplace-edit is old and you need to upgrade or fix yourself. Look at this addon's package.json and it's got this fixed dependency:
"dependencies": {
"ember-cli-babel": "^5.1.3",
"ember-cli-htmlbars": "0.7.9" // this was released Jun 12, 2015
}
For the record, my ember 2.18 app bundled "ember-cli-htmlbars": "^2.0.1" by default. So lets go to the release of 0.7.9, download the source code, and look at the offending line in :
templateCompilerPath: function() {
var config = this.projectConfig();
var templateCompilerPath = config['ember-cli-htmlbars'] && config['ember-cli-htmlbars'].templateCompilerPath;
if (!templateCompilerPath) {
// THIS ONLY WORKS FOR BOWER VERSIONS OF EMBER
templateCompilerPath = this.project.bowerDirectory + '/ember/ember-template-compiler';
}
return path.resolve(this.project.root, templateCompilerPath);
}
So you have a couple of reasonable options
Fix the addon and make it support later Ember versions and open a PR to get merged upstream (by updating this ember cli htmlbars dependency)
Fork the addon and fix it without merging upstream and point to your fork
Remove the addon and rework this part of your application
use the templateCompilerPath option to point to your ember-source version (but this is honestly the worst option)

ember-cli-mirage and babel error

I am following this tutorial: https://guides.emberjs.com/v2.8.0/tutorial/installing-addons/
and when i get to adding ember-cli-mirage it comes up with a build error and wont load the app:
Richards-MacBook-Air:super-rentals rpt$ ember s
WARNING: Node v8.9.1 has currently not been tested against Ember CLI and may result in unexpected behaviour.
Just getting started with Ember? Please visit http://localhost:4200/ember-getting-started to get going
Livereload server on http://localhost:49154
Serving on http://localhost:4200/
{ Error: read ECONNRESET
at _errnoException (util.js:1024:11)
at TLSWrap.onread (net.js:615:25)
code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' }
File: ember-cli-mirage/utils/inflector.js
The Broccoli Plugin: [broccoli-persistent-filter:Babel] failed with:
SyntaxError: ember-cli-mirage/utils/inflector.js: Unexpected token (4:14)
export { singularize, pluralize } from 'ember-inflector';
export { Ember.String.capitalize as capitalize, Ember.String.camelize as camelize, Ember.String.dasherize as dasherize, Ember.String.underscore as underscore };
at Parser.pp.raise (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/broccoli-babel-transpiler/node_modules/babel-core/node_modules/babylon/lib/parser/location.js:24:13)
at Parser.pp.unexpected (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/broccoli-babel-transpiler/node_modules/babel-core/node_modules/babylon/lib/parser/util.js:82:8)
at Parser.pp.expect (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/broccoli-babel-transpiler/node_modules/babel-core/node_modules/babylon/lib/parser/util.js:76:33)
at Parser.pp.parseExportSpecifiers (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/broccoli-babel-transpiler/node_modules/babel-core/node_modules/babylon/lib/parser/statement.js:772:12)
at Parser.pp.parseExport (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/broccoli-babel-transpiler/node_modules/babel-core/node_modules/babylon/lib/parser/statement.js:701:28)
at Parser.parseExport (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/broccoli-babel-transpiler/node_modules/babel-core/node_modules/babylon/lib/plugins/flow.js:713:20)
at Parser.pp.parseStatement (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/broccoli-babel-transpiler/node_modules/babel-core/node_modules/babylon/lib/parser/statement.js:115:90)
at Parser.parseStatement (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/broccoli-babel-transpiler/node_modules/babel-core/node_modules/babylon/lib/plugins/flow.js:655:22)
at Parser.pp.parseTopLevel (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/broccoli-babel-transpiler/node_modules/babel-core/node_modules/babylon/lib/parser/statement.js:30:21)
at Parser.parse (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/broccoli-babel-transpiler/node_modules/babel-core/node_modules/babylon/lib/parser/index.js:70:17)
at Object.parse (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/broccoli-babel-transpiler/node_modules/babel-core/node_modules/babylon/lib/index.js:45:50)
at Object.exports.default (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/broccoli-babel-transpiler/node_modules/babel-core/lib/helpers/parse.js:36:18)
at File.parse (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/broccoli-babel-transpiler/node_modules/babel-core/lib/transformation/file/index.js:574:40)
at File.parseCode (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/broccoli-babel-transpiler/node_modules/babel-core/lib/transformation/file/index.js:691:20)
at /Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/broccoli-babel-transpiler/node_modules/babel-core/lib/transformation/pipeline.js:167:12
at File.wrap (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/broccoli-babel-transpiler/node_modules/babel-core/lib/transformation/file/index.js:639:16)
at Pipeline.transform (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/broccoli-babel-transpiler/node_modules/babel-core/lib/transformation/pipeline.js:165:17)
at /Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/broccoli-babel-transpiler/lib/parallel-api.js:123:26
at initializePromise (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:567:5)
at new Promise (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1039:33)
at Object.transformString (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/broccoli-babel-transpiler/lib/parallel-api.js:117:12)
at Babel.transform (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/broccoli-babel-transpiler/index.js:110:22)
at Babel.processString (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/broccoli-babel-transpiler/index.js:216:15)
at Promise.then.result.output (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/broccoli-babel-transpiler/node_modules/broccoli-persistent-filter/lib/strategies/persistent.js:41:23)
at initializePromise (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:567:5)
at new Promise (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1039:33)
at /Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/broccoli-babel-transpiler/node_modules/broccoli-persistent-filter/lib/strategies/persistent.js:40:18
at tryCatch (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:525:12)
at invokeCallback (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:538:13)
at publish (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:508:7)
at flush (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:2415:5)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
The broccoli plugin was instantiated at:
at Babel.Plugin (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/broccoli-babel-transpiler/node_modules/broccoli-persistent-filter/node_modules/broccoli-plugin/index.js:7:31)
at Babel.Filter [as constructor] (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/broccoli-babel-transpiler/node_modules/broccoli-persistent-filter/index.js:64:10)
at new Babel (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/broccoli-babel-transpiler/index.js:37:10)
at EmberApp._addonTree (/Users/rpt/projects/super-rentals/node_modules/ember-cli/lib/broccoli/ember-app.js:910:29)
at EmberApp._processedVendorTree (/Users/rpt/projects/super-rentals/node_modules/ember-cli/lib/broccoli/ember-app.js:944:20)
at EmberApp._processedExternalTree (/Users/rpt/projects/super-rentals/node_modules/ember-cli/lib/broccoli/ember-app.js:975:21)
at EmberApp.appAndDependencies (/Users/rpt/projects/super-rentals/node_modules/ember-cli/lib/broccoli/ember-app.js:1071:30)
at EmberApp.javascript (/Users/rpt/projects/super-rentals/node_modules/ember-cli/lib/broccoli/ember-app.js:1201:34)
at EmberApp.toArray (/Users/rpt/projects/super-rentals/node_modules/ember-cli/lib/broccoli/ember-app.js:1606:10)
at EmberApp.toTree (/Users/rpt/projects/super-rentals/node_modules/ember-cli/lib/broccoli/ember-app.js:1628:30)
at module.exports (/Users/rpt/projects/super-rentals/ember-cli-build.js:23:14)
at Class.setupBroccoliBuilder (/Users/rpt/projects/super-rentals/node_modules/ember-cli/lib/models/builder.js:74:19)
at Class.init (/Users/rpt/projects/super-rentals/node_modules/ember-cli/lib/models/builder.js:54:10)
at Class.superWrapper [as init] (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/core-object/lib/assign-properties.js:32:18)
at new Class (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/core-object/core-object.js:32:33)
at Class.run (/Users/rpt/projects/super-rentals/node_modules/ember-cli/lib/tasks/serve.js:15:19)
at /Users/rpt/projects/super-rentals/node_modules/ember-cli/lib/commands/serve.js:76:24
at tryCatch (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:525:12)
at invokeCallback (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:538:13)
at /Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:606:14
at flush (/Users/rpt/projects/super-rentals/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:2415:5)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
Can anyone point me in the right direction as to whats going wrong?
Im using ember 2.8.0 and using the latest version of ember-cli-mirage.
Please bare in mind I am really new to ember.
Is there a specific reason you are starting with Ember 2.8? Unless there is, I would suggest fully removing Ember-CLI (npm uninstall -g ember-cli) and starting over with Ember 3.0.
The reason I suggest that is that the errors you are seeing there look to be due to Babel upgrades that Mirage is expecting in the latest version of Mirage but that don’t exist in the older version of Ember that you have installed.

Ember serve doesn't work (Error: Couldn't find preset "es2015")

I am building a web app using Ember. I created the project with ember new test-app and have made no changes to the generated files. When I run ember serve, I immediately receive the following error:
The Broccoli Plugin: [BroccoliMergeTrees: Addon#compileAddon(ember-welcome-page) ] failed with:
Error: Couldn't find preset "es2015" relative to directory "/Users/jacob"
at /Users/jacob/Desktop/test-app/node_modules/babel-core/lib/transformation/file/options/option-manager.js:293:19
at Array.map ()
at OptionManager.resolvePresets (/Users/jacob/Desktop/test-app/node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20)
at OptionManager.mergePresets (/Users/jacob/Desktop/test-app/node_modules/babel-core/lib/transformation/file/options/option-manager.js:264:10)
at OptionManager.mergeOptions (/Users/jacob/Desktop/test-app/node_modules/babel-core/lib/transformation/file/options/option-manager.js:249:14)
at OptionManager.init (/Users/jacob/Desktop/test-app/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
at File.initOptions (/Users/jacob/Desktop/test-app/node_modules/babel-core/lib/transformation/file/index.js:212:65)
at new File (/Users/jacob/Desktop/test-app/node_modules/babel-core/lib/transformation/file/index.js:135:24)
at Pipeline.transform (/Users/jacob/Desktop/test-app/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
at Promise (/Users/jacob/Desktop/test-app/node_modules/broccoli-babel-transpiler/lib/parallel-api.js:102:26)
The broccoli plugin was instantiated at:
at BroccoliMergeTrees.Plugin (/Users/jacob/Desktop/test-app/node_modules/broccoli-plugin/index.js:7:31)
at new BroccoliMergeTrees (/Users/jacob/Desktop/test-app/node_modules/ember-cli/node_modules/broccoli-merge-trees/index.js:16:10)
at Function.BroccoliMergeTrees [as _upstreamMergeTrees] (/Users/jacob/Desktop/test-app/node_modules/ember-cli/node_modules/broccoli-merge-trees/index.js:10:53)
at mergeTrees (/Users/jacob/Desktop/test-app/node_modules/ember-cli/lib/broccoli/merge-trees.js:85:33)
at Class.compileAddon (/Users/jacob/Desktop/test-app/node_modules/ember-cli/lib/models/addon.js:1092:12)
at Class.treeForAddon (/Users/jacob/Desktop/test-app/node_modules/ember-cli/lib/models/addon.js:746:26)
at Class.treeForAddon (/Users/jacob/Desktop/test-app/node_modules/ember-welcome-page/index.js:27:41)
at Class.superWrapper [as treeForAddon] (/Users/jacob/Desktop/test-app/node_modules/core-object/lib/assign-properties.js:34:20)
at Class._treeFor (/Users/jacob/Desktop/test-app/node_modules/ember-cli/lib/models/addon.js:557:33)
at Class.treeFor (/Users/jacob/Desktop/test-app/node_modules/ember-cli/lib/models/addon.js:517:21)
I referred to this question for help, but I still received the same error after trying the solution.
I am running ember-cli v2.16.2 and node v8.9.0 on macOS High Sierra. In my node installation, the only three global modules I have installed are bower, broccoli-cli, and ember-cli.
Please do clean reinstall of ember-cli package.
npm uninstall -g ember-cli
npm cache clean --force
npm install -g ember-cli
Then run your ember new command once again and test it.