Not able to install ember-truth-helpers

Here is my webpack.config.js file:

const path = require('path');
require('./.webpack/build-includes');

module.exports = {
    entry: {
        polyfill: 'babel-polyfill',
        libs: './.webpack/webpack-entry-dev.js',
        templates: './.webpack/webpack-templates.js',
        app: './.webpack/webpack-app.js',
    },
    cache: true,
    devtool: 'inline-source-map',
    output: {
        filename: '[name].js',
        path: path.resolve('../IMS.Web/Ember/dist'),
        publicPath: 'public'
    },
    resolve: {
        alias: {
            app: path.resolve('./app'),
            helpers: path.resolve('./helpers/ember'),
            styles: path.resolve('./CSS'),
            libs: path.resolve('./libs')
        },
        extensions: ['.hbs', '.js', '.less']
    },
    module: {
        rules: [{
            test: /\.js$/,
            exclude: /(node_modules|bower_components)/,
            use: {
                loader: 'babel-loader',
                options: {
                    presets: ['@babel/preset-env']
                }
            }
        }, {
            test: /\.hbs$/,
            loader: path.resolve(__dirname, `.webpack/webpack-handlebars`),
            options: {
                sourceMap: true
            }
        }, {
            test: /\.(less)$/,
            use: [{
                    loader: 'style-loader',
                    options: {
                        injectType: 'singletonStyleTag'
                    }
                },
                {
                    loader: 'css-loader',
                    options: {
                        sourceMap: true
                    }
                },
                {
                    loader: 'less-loader',
                    options: {
                        sourceMap: true
                    }
                }
            ],
        }, 
        {
            test: /\.(scss|sass)$/,
            use: [{
                    loader: 'style-loader',
                    options: {
                        sourceMap: true
                    }
                },
                {
                    loader: 'css-loader',
                    options: {
                        sourceMap: true
                    }
                },
                {
                    loader: 'sass-loader',
                    options: {
                        sourceMap: true
                    }
                }
            ],
        }, 
        {
            test: /\.(woff|woff2|eot|ttf|jpg|jpeg|png|svg|gif)$/,
            use: [{
                loader: 'file-loader',
                options: {
                    name: '[name].[ext]',
                    publicPath: 'Ember/dist'
                },
            }],
        }],
    },
    mode: 'none'
}

You will absolutely come out ahead on time by fixing this weird build system before trying to do anything else. Otherwise, every little thing you try to do is going to be undocumented and nobody will be able to help you. You’re going to waste hours and hours on problems that should never have happened in the first place.

(Whoever handed you this app was being irresponsible. They made a deliberate choice to do things the wrong way. I’m angry at them on your behalf. :stuck_out_tongue_closed_eyes:)

It might not actually be a lot of work to port to standard ember-cli. It depends on how weird the layout of your /app directory is and how many files there are overall.

I’m going to guess that somewhere in the application (probably under .webpack/) is a bunch of code calling the define() function to tell Ember about various modules. That may be the key to helping you understand what’s going on. When you use the standard build, all that define() stuff happens behind-the-scenes automatically. When you see define('your-app/helpers/whatever', function() { ... }), that’s equivalent to using the standard layout and putting the ... stuff in a file named app/helpers/whatever.js.

Separately from your existing app, I suggest running ember new your-app-name to make a new empty app in the standard layout. That will let you see how it’s supposed to look, and you can copy files from the old to the new by following what the define() statements say.

Another tip that will make the porting go smoother is to make sure you ember install ember-auto-import in the new app. I bet the existing app code is directly importing some of the things from your package.json (like bootstrap-datepicker), and having ember-auto-import present will make sure that continues to do the right thing.