Giter Club home page Giter Club logo

Comments (16)

FallingSnow avatar FallingSnow commented on May 13, 2024

Error when visiting https://cdn.esm.sh/bundle-ojv7uwoviwslf342bemex5fq7b4wvqk3.js:

/* esm.sh - error */
throw new Error("[esm.sh] " + "npm: package 'bundle-ojv7uwoviwslf342bemex5fq7b4wvqk3.js' not found");
export default null;
``

from esm.sh.

ije avatar ije commented on May 13, 2024

please try deno --reload run [...], i will fix this (new server deployment will clean up the old builds)

from esm.sh.

FallingSnow avatar FallingSnow commented on May 13, 2024

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 import_map.json to work around the graphql issue (#14) right now. (Note the addition of graphql)

{
    "imports": {
        "https://esm.sh/": "https://esm.sh/[react,react-hook-form,@fluentui/react,react-flow-renderer,swr,graphql]/"
    }
}

from esm.sh.

ije avatar ije commented on May 13, 2024

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.

from esm.sh.

ije avatar ije commented on May 13, 2024

should work now:
https://esm.sh/[react,react-dom,swr]/react

from esm.sh.

FallingSnow avatar FallingSnow commented on May 13, 2024

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;

from esm.sh.

shadowtime2000 avatar shadowtime2000 commented on May 13, 2024

@FallingSnow CAn you share the imports?

from esm.sh.

FallingSnow avatar FallingSnow commented on May 13, 2024

import_map.json

{
    "imports": {
        "https://esm.sh/": "https://esm.sh/[react,react-hook-form,react-flow-renderer,swr]/"
    }
}

from esm.sh.

shadowtime2000 avatar shadowtime2000 commented on May 13, 2024

@FallingSnow You have to change that to [react,react-hook-form,react-flow-renderer,swc,tailwindcss] because the import to tailwind is being prefixed with that bundle which makes it invalid cuz tailwind isn't included in it.

from esm.sh.

FallingSnow avatar FallingSnow commented on May 13, 2024

Is there a way I could make a bundle for react related modules and no bundles for the others?

from esm.sh.

shadowtime2000 avatar shadowtime2000 commented on May 13, 2024

@FallingSnow

{
    "imports": {
        "react": "https://esm.sh/[react,react-hook-form,react-flow-renderer,swr]/"
    }
}

Then you just do

import "react/swr";

or whatever you want.

from esm.sh.

FallingSnow avatar FallingSnow commented on May 13, 2024

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.

from esm.sh.

FallingSnow avatar FallingSnow commented on May 13, 2024

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]/"
    }
}

from esm.sh.

FallingSnow avatar FallingSnow commented on May 13, 2024

Looks like it was failing https://github.com/alephjs/aleph.js/blob/0456c9da64ba09967a1b376358c93e8991bdff97/project.ts#L1022 is remote test.

from esm.sh.

ije avatar ije commented on May 13, 2024

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.

from esm.sh.

FallingSnow avatar FallingSnow commented on May 13, 2024

Oh ok, I forgot you already said this and just kept charging forward, oops. I was trying to use it to avoid using ?external=react on everything.

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.

from esm.sh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.