Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4828

Using ember-inflector in Node

$
0
0

@samselikoff wrote:

My addon uses ember-inflector and I’m trying to figure out if it can be used in Node.

I’m trying to require() some of my addon’s ES6 modules in node via esm, and I have it working for many modules. But it’s failing for ember-inflector.

Here’s the import statement from my ES6 module:

import { singularize, pluralize } from 'ember-inflector';

When I try to run esm on this module, I get

Missing export name ‘singularize’ in ES module: file:///~/Projects/oss/ember-cli-mirage/node_modules/ember-inflector/index.js

I think these imports work in the browser because of some RequireJS/AMD semantics that don’t transfer nicely to Node.

I’ve tried importing different paths but haven’t gotten anywhere.

Is there something simple I’m missing for how to use this package in Node, or is it not possible because it is really designed as an Ember addon?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4828

Trending Articles