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
Bundle doesn't seem to have been generated - 404 #13
Comments
Error when visiting /* esm.sh - error */
throw new Error("[esm.sh] " + "npm: package 'bundle-ojv7uwoviwslf342bemex5fq7b4wvqk3.js' not found");
export default null;
`` |
please try |
I'm using Aleph. What command would I run for that? I already tried $ rm -rf .aleph
$ aleph dev
INFO Download https://esm.sh/graphql • https://esm.sh/[react,react-hook-form,@fluentui/react,react-flow-renderer,swr,graphql]/graphql?target=es2018&dev
INFO Download https://cdn.esm.sh/bundle-afim5jp55sr57xkzkzahvfk7mmkygh6l.js
error: Uncaught (in promise) Error: Download https://cdn.esm.sh/bundle-afim5jp55sr57xkzkzahvfk7mmkygh6l.js: Download https://cdn.esm.sh/bundle-afim5jp55sr57xkzkzahvfk7mmkygh6l.js: 404 - Not Found Made a slight change to {
"imports": {
"https://esm.sh/": "https://esm.sh/[react,react-hook-form,@fluentui/react,react-flow-renderer,swr,graphql]/"
}
} |
i know what happened, i will fix it ASAP, thanks! please use package link instead of the bundle link, aleph v0.3 will bundle the code in production mode. |
should work now: |
Not sure if I'm using this right. INFO Download https://esm.sh/tailwindcss/dist/tailwind.min.css • https://esm.sh/[react,react-hook-form,react-flow-renderer,swr]/tailwindcss/dist/tailwind.min.css?target=es2018&dev
error: Uncaught (in promise) Error: Download https://esm.sh/tailwindcss/dist/tailwind.min.css: Download https://esm.sh/tailwindcss/dist/tailwind.min.css: 500 - Internal Server Error /* esm.sh - error */
throw new Error("[esm.sh] " + "npm: package '[react,react-hook-form,react-flow-renderer,swr]' not found");
export default null; |
@FallingSnow CAn you share the imports? |
import_map.json {
"imports": {
"https://esm.sh/": "https://esm.sh/[react,react-hook-form,react-flow-renderer,swr]/"
}
} |
@FallingSnow You have to change that to |
Is there a way I could make a bundle for react related modules and no bundles for the others? |
{
"imports": {
"react": "https://esm.sh/[react,react-hook-form,react-flow-renderer,swr]/"
}
} Then you just do import "react/swr"; or whatever you want. |
Hmmm, now I'm running into this: $ aleph dev -L debug
DEBUG compile '/app.tsx' in 66ms
error: Uncaught (in promise) NotFound: No such file or directory (os error 2)
at processResponse (deno:core/core.js:223:11)
at Object.jsonOpAsync (deno:core/core.js:240:12)
at async open (deno:runtime/js/30_files.js:44:17)
at async Object.readFile (deno:runtime/js/40_read_file.js:15:18)
at async Project._compile (project.ts:1019:29)
at async Project._compile (project.ts:1169:28)
at async Project._init (project.ts:655:21)
at async project.ts:106:13
at async start (server.ts:12:5) Not sure what's causing it. |
I modified the aleph source to see which file it was trying to read in project.ts. @shadowtime2000 Am I doing something wrong or is the module resolution not working as expected? $ aleph dev -L debug
{ filepath: "/home/ayrton/Coding/node/mmes/server/app.tsx" }
DEBUG compile '/app.tsx' in 65ms
{ filepath: "/home/ayrton/Coding/node/mmes/server/style/index.less" }
{ filepath: "/home/ayrton/Coding/node/mmes/server/react/react" }
error: Uncaught (in promise) NotFound: No such file or directory (os error 2)
at processResponse (deno:core/core.js:223:11)
at Object.jsonOpAsync (deno:core/core.js:240:12)
at async open (deno:runtime/js/30_files.js:44:17)
at async Object.readFile (deno:runtime/js/40_read_file.js:15:18)
at async Project._compile (project.ts:1023:29)
at async Project._compile (project.ts:1173:28)
at async Project._init (project.ts:658:21)
at async project.ts:106:13
at async start (server.ts:12:5) app.tsx import React, { ComponentType } from "react/react"; import_map.json {
"imports": {
"react": "https://esm.sh/[react,react-hook-form,react-flow-renderer,swr,@fluentui/react,@uifabric/icons]/"
}
} |
Looks like it was failing https://github.com/alephjs/aleph.js/blob/0456c9da64ba09967a1b376358c93e8991bdff97/project.ts#L1022 is remote test. |
i think using esm.sh's bundle mode in alephjs is not a good idea since the alephjs will handle the react import URL. and 0.3 will bundle the app in production mode. |
Oh ok, I forgot you already said this and just kept charging forward, oops. I was trying to use it to avoid using I did get it pretty close to working, it actually imports now. app.tsx import React, { ComponentType } from "https://esm.sh/react/react"; import_map.json {
"imports": {
"https://esm.sh/react/": "https://esm.sh/[react,react-hook-form,react-flow-renderer,swr,@fluentui/react,@uifabric/icons]/"
}
} EDIT: Accidentally submitted comment. |
import_map.json
The text was updated successfully, but these errors were encountered: