[GH-ISSUE #1055] "This relative module was not found" when adding a new webpack resolve.alias #622

Closed
opened 2026-02-26 02:33:44 +03:00 by kerem · 1 comment
Owner

Originally created by @handhikadj on GitHub (Aug 22, 2019).
Original GitHub issue: https://github.com/koel/koel/issues/1055

at webpack.config.js, I've added a path alias:

module.exports = {
    resolve: {
        alias: {
            "@": path.resolve(__dirname, "resources/assets/js"),
            "@css": path.resolve(__dirname, "resources/assets/css"),
        }
    },
    module: {
        ...
    }
};

and in app.js :

import "./static-loader";
import Vue from "vue";
import App from "./app.vue";
...

/** Global Styles */
import "@css/globals.css";

image

but got error when running yarn dev

 ERROR  Failed to compile with 1 errors                                                                                                                                                                                               10:18:08

This relative module was not found:

* ./ss/globals.css in ./resources/assets/js/app.js
Originally created by @handhikadj on GitHub (Aug 22, 2019). Original GitHub issue: https://github.com/koel/koel/issues/1055 at `webpack.config.js`, I've added a path alias: ```javascript module.exports = { resolve: { alias: { "@": path.resolve(__dirname, "resources/assets/js"), "@css": path.resolve(__dirname, "resources/assets/css"), } }, module: { ... } }; ``` and in `app.js` : ```javascript import "./static-loader"; import Vue from "vue"; import App from "./app.vue"; ... /** Global Styles */ import "@css/globals.css"; ``` ![image](https://user-images.githubusercontent.com/22522638/63483602-2f24fd00-c4c7-11e9-8e84-1d612cc5aef1.png) but got error when running `yarn dev` ``` ERROR Failed to compile with 1 errors 10:18:08 This relative module was not found: * ./ss/globals.css in ./resources/assets/js/app.js ```
kerem closed this issue 2026-02-26 02:33:44 +03:00
Author
Owner

@phanan commented on GitHub (Aug 22, 2019):

Sorry, I don't provide this kind of support.

<!-- gh-comment-id:523957844 --> @phanan commented on GitHub (Aug 22, 2019): Sorry, I don't provide this kind of support.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#622
No description provided.