Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AU Build Fails while bundling #1023

Closed
BlischkeFlorian opened this issue Jan 22, 2019 · 5 comments · Fixed by #1024
Closed

AU Build Fails while bundling #1023

BlischkeFlorian opened this issue Jan 22, 2019 · 5 comments · Fixed by #1024

Comments

@BlischkeFlorian
Copy link

After update to beta.10:

I get a lot of these errors while bundling in the console:

ERROR [Bundler] Unable to analyze .
INFO [Bundler] Error: Unable to find package metadata (package.json) of .
ERROR [Bundler] Failed to add Nodejs module ./app.html
@3cp
Copy link
Member

3cp commented Jan 22, 2019

Can I have a look of your aurelia.json?

@BlischkeFlorian
Copy link
Author

i've replaced the 'sensitive' Data with [XXX]

{
    "name": "[XXX]",
    "type": "project:application",
    "bundler": {
        "id": "cli",
        "displayName": "Aurelia-CLI"
    },
    "build": {
        "copyFiles": {
            "node_modules/idb-keyval/dist/idb-keyval-iife.js": "dist/[XXX]/scripts",
            "manifest.json": "dist/[XXX]",
            "manup.min.js": "dist/[XXX]",
            "service-worker.js": "dist/[XXX]",
            "offline.html": "dist/[XXX]",
            "online-test.html": "dist/[XXX]",
            "locales/de/translation.json": "dist/[XXX]/locales/de"
        },
        "targets": [
            {
                "id": "web",
                "displayName": "Web",
                "port": 9000,
                "index": "index.html",
                "baseDir": ".",
                "output": "scripts"
            }
        ],
        "options": {
            "minify": "stage & prod",
            "sourcemaps": "dev & stage",
            "rev": false,
            "cache": "dev & stage"
        },
        "bundles": [
            {
                "name": "app-bundle.js",
                "source": [
                    "**/*.{js,css,html}"
                ]
            },
            {
                "name": "vendor-bundle.js",
                "prepend": [
                    "node_modules/bluebird/js/browser/bluebird.core.js",
                    {
                        "path": "node_modules/aurelia-cli/lib/resources/scripts/configure-bluebird-no-long-stacktraces.js",
                        "env": "stage & prod"
                    },
                    {
                        "path": "node_modules/aurelia-cli/lib/resources/scripts/configure-bluebird.js"
                    },
                    "node_modules/systemjs/dist/system.js"
                ],
                "dependencies": [
                    "aurelia-bootstrapper",
                    "aurelia-loader-default",
                    "aurelia-pal-browser",
                    {
                        "name": "aurelia-testing",
                        "env": "dev"
                    },
                    {
                        "name": "text",
                        "path": "../node_modules/systemjs-plugin-text",
                        "main": "text"
                    },
                    {
                        "name": "idb-keyval",
                        "path": "../node_modules/idb-keyval",
                        "main": "dist/idb-keyval-cjs"
                    },
                    "jquery",
                    "jquery.soap"
                ]
            }
        ],
        "loader": {
            "type": "system",
            "configTarget": "vendor-bundle.js",
            "includeBundleMetadataInConfig": "auto",
            "plugins": [
                {
                    "name": "text",
                    "extensions": [
                        ".html",
                        ".css"
                    ],
                    "stub": true
                }
            ]
        }
    },
    "platform": {
        "id": "web",
        "displayName": "Web",
        "port": 9000,
        "index": "index.html",
        "baseDir": ".",
        "output": "scripts"
    },
    "transpiler": {
        "id": "typescript",
        "displayName": "TypeScript",
        "fileExtension": ".ts",
        "dtsSource": [
            "./custom_typings/**/*.d.ts"
        ],
        "source": "src/**/*.ts"
    },
    "markupProcessor": {
        "id": "none",
        "displayName": "None",
        "fileExtension": ".html",
        "source": "src/**/*.html"
    },
    "cssProcessor": {
        "id": "sass",
        "displayName": "Sass",
        "fileExtension": ".scss",
        "source": "src/**/*.scss"
    },
    "editor": {
        "id": "webstorm",
        "displayName": "WebStorm"
    },
    "unitTestRunners": [
        {
            "id": "none",
            "displayName": "None"
        }
    ],
    "integrationTestRunner": {
        "id": "none",
        "displayName": "None"
    },
    "paths": {
        "root": "src",
        "resources": "resources",
        "elements": "resources/elements",
        "attributes": "resources/attributes",
        "valueConverters": "resources/value-converters",
        "bindingBehaviors": "resources/binding-behaviors"
    },
    "packageManager": "npm"
}

@3cp
Copy link
Member

3cp commented Jan 22, 2019

Nothing wrong with your config. It's a cli bug with systemjs, I can reproduce it with systemjs + babel/ts. Fix is coming.

@3cp
Copy link
Member

3cp commented Jan 22, 2019

After the fix is released, you need to run au clear-cache to purge wrongly cached deps.

@BlischkeFlorian
Copy link
Author

thank you guys. Works like a charm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants