-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Can't compile any Vue project - The relative module was not found ./src/main.ts in multi ./src/main.ts #2934
Comments
Can't reproduce. Here's the screencast: https://asciinema.org/a/us6wLLCaX39COtwXOSmBpIJPo |
OK! Got it! This is a problem when using directory junctions in Windows, and it's brand new, since I've been using those for quite a lot of time with Vue. I'm updating the issue. |
I have just noticed webpack has been updated from 4.23.1 to 4.25.1, which explains the difference. This still needs to be fixed, people starting new projects on linked directories (at least on Windows) are going to face this. |
Does disabling |
I tried it by adding it to vue.config.js ‘s webpackConfiguration. Unfortunately it did not work.
From: Haoqun Jiang <notifications@github.com>
Sent: Monday, November 12, 2018 12:03 PM
To: vuejs/vue-cli <vue-cli@noreply.github.com>
Cc: Itay Zandbank <itay@chelem.co.il>; Author <author@noreply.github.com>
Subject: Re: [vuejs/vue-cli] Can't compile any Vue project - The relative module was not found ./src/main.ts in multi ./src/main.ts (#2934)
Does disabling symlink help? https://webpack.js.org/configuration/resolve/#resolve-symlinks
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#2934 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AAlkfjt_aZoY9GX7MNc3DTBcLO200EMaks5uuUdAgaJpZM4YZG63> . <https://github.com/notifications/beacon/AAlkfsJTf44t3uLfaBQNchtr6IXvmv81ks5uuUdAgaJpZM4YZG63.gif>
|
Hi, I am experiencing exactly the same issue. Here is my build log in VS2017: 1>Target CompileTypeScriptWithTSConfig: What should I do to have it fixed? |
I am also having this issue. Any solutions? |
Same issue!!! |
Same here... |
I just pass through this error by creating a folder named "src" and an empty file named "main.js". |
The issue for me is more likely with Vui UI. For some reason when i run anything from it - i get these errors:
But when i run same commands manually - they work. Maybe its why this issue has so little attention, but its irritating a lot. Using Mac Os by the way |
Me too, Can you solve it? |
Having this same issue in an automated build pipeline, although works locally. MacOS. Is this related to symlinks in MacOS? |
The problem from vue ui |
I had this issue recently setting up a coworker on an existing project. It turned out her machine cared a file was case sensitive and mine does not. A notable difference is she has node 12 and I am still on 10. |
I had the same issue (below is the error) and solved it. When importing the CSS file in main.js, add .css extension. It solved the error for me. ERROR Failed to compile with 1 errors 1:26:47 PM This relative module was not found:
|
same problem,i create a empty main.ts at src directory,and it fix. |
-Vue UI I used capitals (nameOfProject) and got the “The relative module was not found ” error. |
Same here, app was launching fine with command and not using vue UI. So I tried this :
Two solutions :
Relaunch the ui client. |
aha, may be you can try my project near-admin-vue, i found that it's my mistake at webpack config finally. |
Same here. This seems to be always popping up once in a while looking at this thread. Is there like a clear root cause which could be fixed or is an empty file really considered as a good solution? |
MacOS |
I ran into a similar issue where build succeeded locally but failed in node Docker image running in CI system remotely. Hope this helps someone in a similar situation. |
Same issue with me. Resolved after renaming the dir casing. |
I have this issue too, it works locally when running build on Windows 10, but when I run in docker alpine based image it fails.... I created demo repository that works locally, but when run in docker (using ./scripts/build) it fails with this error. |
@buksy90 It's not the bug of CLI. using |
@fangbinwei oh Im sorry, you're right :) ... thank you |
Any update? |
I was having the same problem, even though I had the main.ts file in the src folder, it still gave me the error that this file was not found. My solution to this was to add a conditional to the Dockerfile to ensure that main.ts exists:
this solved the problem for me :) |
Version
3.1.1
Reproduction link
https://github.com/zmbq/vue-cli-bug
Node and OS info
10.13.0
Steps to reproduce
I've created a new Vue project with the vue cli, specifying Typescript, Babel, no class decorators, SCSS, tslint and no unit tests. The project is located under c:\sources\test. c:\sources is a directory junction (a Windows equivalent of symlinks) to d:\sources.
Then I did a yarn build
What is expected?
Project should compile
What is actually happening?
ERROR Failed to compile with 1 errors 9:37:35 AM
This relative module was not found:
ERROR Build failed with errors.
When working from d:\sources\test everything is working properly. I've been using Vue on the same computer with the same directory junction without an issue.
Angular has a --preserve-symlinks option to make this work, I did not find a Vue counterpart.
The text was updated successfully, but these errors were encountered: