` ember server` throws error, not able to run the app - ember.js

I am a absolute new with emberjs. I am just following this tutorial to create my first app : http://yoember.com/ but as like tutorials instruction I am running ember server but I thrown with error like :
The Broccoli Plugin: [ConfigReplace] failed with:
Error: Build Canceled: Broccoli Builder ran into an error with Funnel plugin. �
at new BroccoliBuildError (F:\EmberJS\libraray-app\node_modules\broccoli-builder\lib\broccoli-build-error.js:40:9)
at F:\EmberJS\libraray-app\node_modules\broccoli-builder\lib\builder.js:168:19
at tryCatch (F:\EmberJS\libraray-app\node_modules\rsvp\dist\rsvp.js:539:12)
at invokeCallback (F:\EmberJS\libraray-app\node_modules\rsvp\dist\rsvp.js:554:13)
at publish (F:\EmberJS\libraray-app\node_modules\rsvp\dist\rsvp.js:522:7)
at publishRejection (F:\EmberJS\libraray-app\node_modules\rsvp\dist\rsvp.js:457:3)
at flush (F:\EmberJS\libraray-app\node_modules\rsvp\dist\rsvp.js:2414:5)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
The broccoli plugin was instantiated at:
at ConfigReplace.Plugin (F:\EmberJS\libraray-app\node_modules\broccoli-plugin\index.js:7:31)
at new ConfigReplace (F:\EmberJS\libraray-app\node_modules\broccoli-config-replace\index.js:13:10)
at EmberApp.index (F:\EmberJS\libraray-app\node_modules\ember-cli\lib\broccoli\ember-app.js:686:12)
at EmberApp.toArray (F:\EmberJS\libraray-app\node_modules\ember-cli\lib\broccoli\ember-app.js:1661:12)
at EmberApp.toTree (F:\EmberJS\libraray-app\node_modules\ember-cli\lib\broccoli\ember-app.js:1684:38)
at module.exports (F:\EmberJS\libraray-app\ember-cli-build.js:22:14)
at Builder.setupBroccoliBuilder (F:\EmberJS\libraray-app\node_modules\ember-cli\lib\models\builder.js:56:19)
at new Builder (F:\EmberJS\libraray-app\node_modules\ember-cli\lib\models\builder.js:30:10)
at ServeTask.run (F:\EmberJS\libraray-app\node_modules\ember-cli\lib\tasks\serve.js:24:55)
at Promise.resolve.then (F:\EmberJS\libraray-app\node_modules\ember-cli\lib\models\command.js:242:46)
Livereload server on http://localhost:49153
How to fix this?

Related

cordovaProj.create is not a function with Emberjs + corber

I'm trying to add corber to my existing EmberJS application. When I run
corber init then I get
stack: TypeError: cordovaProj.create is not a function
at Class.run (/Users/denisk/.nvm/versions/node/v18.12.1/lib/node_modules/corber/lib/targets/cordova/tasks/create-project.js:33:26)
at /Users/denisk/.nvm/versions/node/v18.12.1/lib/node_modules/corber/lib/tasks/create-project.js:97:24
at tryCatcher (/Users/denisk/.nvm/versions/node/v18.12.1/lib/node_modules/corber/node_modules/rsvp/dist/rsvp.js:326:21)
at invokeCallback (/Users/denisk/.nvm/versions/node/v18.12.1/lib/node_modules/corber/node_modules/rsvp/dist/rsvp.js:498:33)
at publish (/Users/denisk/.nvm/versions/node/v18.12.1/lib/node_modules/corber/node_modules/rsvp/dist/rsvp.js:484:9)
at flush (/Users/denisk/.nvm/versions/node/v18.12.1/lib/node_modules/corber/node_modules/rsvp/dist/rsvp.js:2441:7)
at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
My env is:
ember-cli: 4.9.2
node: 18.12.1
How can I add corber and build mobile app with Ember?

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.

"Error: ENOENT: no such file or directory" on Ember CLI Mirage

I'm an extreme beginner. I'm trying to use Mirage based on the guides shown on the ember website. All my code is more or less the same as in their guide. However, when I go to localhost, I get a Build Error and the following:
dateisrael/mirage/config.js (in /Users/aarontaylor/dateisrael/tmp/babel-input_base_path-B9ZXdbHw.tmp/0)
The Broccoli Plugin: [Babel] failed with:
Error: ENOENT: no such file or directory, open '/Users/aarontaylor/dateisrael/tmp/babel-output_path-qYd6ESrZ.tmp/dateisrael/mirage/config.js'
at Error (native)
at Object.fs.openSync (fs.js:549:18)
at Object.fs.readFileSync (fs.js:397:15)
at Babel.asyncOutputFilteredFile (/Users/aarontaylor/dateisrael/node_modules/ember-cli-babel/node_modules/broccoli-babel-transpiler/node_modules/broccoli-persistent-filter/index.js:216:23)
at lib$rsvp$$internal$$tryCatch (/Users/aarontaylor/dateisrael/node_modules/ember-cli-babel/node_modules/broccoli-babel-transpiler/node_modules/broccoli-persistent-filter/node_modules/rsvp/dist/rsvp.js:1036:16)
at lib$rsvp$$internal$$invokeCallback (/Users/aarontaylor/dateisrael/node_modules/ember-cli-babel/node_modules/broccoli-babel-transpiler/node_modules/broccoli-persistent-filter/node_modules/rsvp/dist/rsvp.js:1048:17)
at lib$rsvp$$internal$$publish (/Users/aarontaylor/dateisrael/node_modules/ember-cli-babel/node_modules/broccoli-babel-transpiler/node_modules/broccoli-persistent-filter/node_modules/rsvp/dist/rsvp.js:1019:11)
at lib$rsvp$asap$$flush (/Users/aarontaylor/dateisrael/node_modules/ember-cli-babel/node_modules/broccoli-babel-transpiler/node_modules/broccoli-persistent-filter/node_modules/rsvp/dist/rsvp.js:1198:9)
at nextTickCallbackWith0Args (node.js:420:9)
at process._tickCallback (node.js:349:13)
The broccoli plugin was instantiated at:
at Babel.Plugin (/Users/aarontaylor/dateisrael/node_modules/ember-cli-babel/node_modules/broccoli-babel-transpiler/node_modules/broccoli-persistent-filter/node_modules/broccoli-plugin/index.js:7:31)
at Babel.Filter [as constructor] (/Users/aarontaylor/dateisrael/node_modules/ember-cli-babel/node_modules/broccoli-babel-transpiler/node_modules/broccoli-persistent-filter/index.js:38:10)
at new Babel (/Users/aarontaylor/dateisrael/node_modules/ember-cli-babel/node_modules/broccoli-babel-transpiler/index.js:34:10)
at Babel (/Users/aarontaylor/dateisrael/node_modules/ember-cli-babel/node_modules/broccoli-babel-transpiler/index.js:29:12)
at Object.registry.add.toTree (/Users/aarontaylor/dateisrael/node_modules/ember-cli-babel/index.js:21:52)
at /Users/aarontaylor/dateisrael/node_modules/ember-cli/node_modules/ember-cli-preprocess-registry/preprocessors.js:184:26
at Array.forEach (native)
at processPlugins (/Users/aarontaylor/dateisrael/node_modules/ember-cli/node_modules/ember-cli-preprocess-registry/preprocessors.js:182:11)
at module.exports.preprocessJs (/Users/aarontaylor/dateisrael/node_modules/ember-cli/node_modules/ember-cli-preprocess-registry/preprocessors.js:175:10)
at EmberApp.appAndDependencies (/Users/aarontaylor/dateisrael/node_modules/ember-cli/lib/broccoli/ember-app.js:1044:25)
I tried ember generate ember-cli-mirage again after it didn't work but this didn't help.
What can I do to fix this?
Thanks

Debowerifying Ember causes error

I have installed ember as a bower component:
bower install ember
The debowerify transform is applied like so:
var debowerify = require('debowerify');
browserify().
.transform(debowerify)
.require('./bower_components/ember/ember.js')
.bundle()
.pipe(source('vendor.js'))
.pipe(gulp.dest('./build'));
When I run the above as a gulp task, it shows me the error:
```
[07:38:56] Starting 'browserify'...
[07:38:56] Running 'bundle'...
events.js:72
throw er; // Unhandled 'error' event
^
Error: Cannot find module '../package.json' from 'app_root/bower_components/ember'
at app_root/node_modules/browserify/node_modules/resolve/lib/async.js:43:25
at load (app_root/node_modules/browserify/node_modules/resolve/lib/async.js:61:43)
at app_root/node_modules/browserify/node_modules/resolve/lib/async.js:67:22
at app_root/node_modules/browserify/node_modules/resolve/lib/async.js:21:47
at Object.oncomplete (fs.js:107:15)
```
On inspecting the ember.js file from the bower_components/ember directory, saw the following code:
var packageVersion = require('../package.json').version;
I am not sure how to resolve this issue and make debowerify play nice with Ember. I have created a repo that demonstrates the problem: https://github.com/saravanak/ember-debowerify