Closed tsanyqudsi closed 1 year ago
I havent had the time to setup SolidJs but might be able todo it this Weekend and see if i can find the error. I think it might still have something todo with the esm move, so ill investigate!
Hm, so i cant seem to reproduce this! vite-aliases package.json has a exports section that should definitely be picked up.. could you provide a test repo? :thinking: - Otherwise i am not sure if i can find the issue on my system..
@Subwaytime
I've set up the repo on https://github.com/tsanyqudsi/vite-aliases-monorepo-test. But most probably it's because of Monorepo setting.
However, you can compare it with the react version ( i've set up in the same monorepo ).
node -v v19.1.0 "vite": "^3.2.4", "vite-aliases": "^0.9.7"
// https://vitejs.dev/config/
export default defineConfig({
plugins: [ViteAliases({
useTypescript: true
}), vue()]
})
@houd1ni https://github.com/Subwaytime/vite-aliases/issues/43#issuecomment-1285106211
The same question was asked and answered there. please do mind to check the issues using the search field.
Working on some fixes atm! This seems to also clear the solidjs issue.. :100:
@houd1ni #43 (comment)
The same question was asked and answered there. please do mind to check the issues using the search field.
Is "I can't reproduce" an answer, really ? Or "most probably due to monorepo" is an answer ? I have no monorepo setting. And due to this half-abandoned issue, forced to use other solutions.
@houd1ni #43 (comment) The same question was asked and answered there. please do mind to check the issues using the search field.
Is "I can't reproduce" an answer, really ? Or "most probably due to monorepo" is an answer ? I have no monorepo setting. And due to this half-abandoned issue, forced to use other solutions.
If you actually CLICKED the link provided, you should see this kind of view :
And that's the answer.
Mind that you displayed a despicable attitude in an open source project towards someone who IS NOT the owner of the project that trying to help.
Also barging in with your own Issue unrelated with the title of the issue and acting entitled.
If you actually CLICKED the link provided, you should see this kind of view :
And that's the answer.
Mind that you displayed a despicable attitude in an open source project towards someone who IS NOT the owner of the project that trying to help.
Also barging in with your own Issue unrelated with the title of the issue and acting entitled.
Why wouldn't you just close this issue with the provided solution to not to misguide some people ? I was really sure that if there's a similar issue, they must be connected or, even better, merged into one.
@houd1ni Because it's a different Issue, If you actually learn github or ACTUALLY able to read. then you should see :
Plus if you actually able to differentiate words. then you should see :
It's an issue FROM #43 that I CREATED. But since it grows into another issue so I actually split it and it becomes #46.
This is an issue for SolidJS and if you read my comment :
I actually wrote "ERR_PACKAGE_PATH_NOT_EXPORTED ( current workaround is to update the package.json )." which IF you checked the post origin which was #43 it should showed that the solution was there.
To add, the repo owner @Subwaytime wrote this :
Which explains why the issue is not closed yet.
So... Yes, it's connected. Yes, I'm using Github's feature to split issues.
Only those who can't read complains and felt misguided.
It seems both issues are actually not related, so i am trying to fix all three, including the newly posted one. The ESM change will still persist, just needs a readme and example update
@tsanyqudsi hey there, sorry for the late response! i have just put out v0.10.0 - this seems to have fixed the issue, atleast for me, can you confirm on your end if it works?
@houd1ni your issue should be fixed now with latest version v0.10.0!
@houd1ni #43 (comment)
The same question was asked and answered there. please do mind to check the issues using the search field.
Hi! Tried it to ensure that issue is fixed. With the initial setup
ViteAliases({
useTypescript: true,
// root: './project-front'
})
it generates output below. With root option uncommented, ERROR [vite-aliases]
disappears, but next lines are the same. deep: true
doesn't have any impact on this. resolve
vite option and other plugins that might affect this, I have disabled also. Command to launch vite is vite ./project --host
, that is the project.json is in H:/p/project-front/
and the vite.config.mts is in H:/p/project-front/project/
.
ERROR [vite-aliases] - No Directories could be found! 10:28:36
at getDirectories (/H:/p/project-front/node_modules/vite-aliases/dist/index.js:132:18)
at async Generator.init (/H:/p/project-front/node_modules/vite-aliases/dist/index.js:238:5)
VITE v4.0.4 ready in 617 ms
➜ Local: http://localhost:5173/
➜ Network: http://192.168.0.100:5173/
➜ press h to show help
X [ERROR] [plugin vite:dep-scan] Cannot read properties of undefined (reading 'length')
node_modules/esbuild/lib/main.js:1357:21:
1357 │ let result = await callback({
╵ ^
at matches$1 (file:///H:/p/project-front/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:152:35)
at file:///H:/p/project-front/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:215:58
at Array.find (<anonymous>)
at Context.resolveId (file:///H:/p/project-front/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:215:42)
at Object.resolveId (file:///H:/p/project-front/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:41433:46)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async resolve (file:///H:/p/project-front/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:41661:26)
at async file:///H:/p/project-front/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:41718:34
at async requestCallbacks.on-resolve (H:\p\project-front\node_modules\esbuild\lib\main.js:1357:22)
at async handleRequest (H:\p\project-front\node_modules\esbuild\lib\main.js:723:13)
This error came from the "onResolve" callback registered here:
node_modules/esbuild/lib/main.js:1281:20:
1281 │ let promise = setup({
at setup (file:///H:/p/project-front/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:41717:19)
at handlePlugins (H:\p\project-front\node_modules\esbuild\lib\main.js:1281:21)
at buildOrServeImpl (H:\p\project-front\node_modules\esbuild\lib\main.js:970:5)
at Object.buildOrServe (H:\p\project-front\node_modules\esbuild\lib\main.js:776:5)
at H:\p\project-front\node_modules\esbuild\lib\main.js:2117:17
at new Promise (<anonymous>)
at Object.build (H:\p\project-front\node_modules\esbuild\lib\main.js:2116:14)
at build (H:\p\project-front\node_modules\esbuild\lib\main.js:1963:51)
at scanImports (file:///H:/p/project-front/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:41606:11)
import { ViteAliases } from "./node_modules/vite-aliases"
@houd1ni - have you tried setting the directory?
ViteAliases({
dir: './project-front'
});
Root can mostly stay as process.cwd()
- Its rare that this needs to change.
Any more Information on these Bugs would be great, as i cannot replicate them. Due to the Issues being stale, i have now closed them till there is more Information for me available that i can work with.
The main issue with SolidJS in vite using
vite-aliases
are :config.resolve.alias
ERR_PACKAGE_PATH_NOT_EXPORTED
( current workaround is to update the package.json ).Your example is working well so I figures it's because of another vite plugins. I haven't check with react but I will later.
I'm using Windows 10 btw, haven't test it on Linux.
Originally posted by @tsanyqudsi in https://github.com/Subwaytime/vite-aliases/issues/43#issuecomment-1283410165