Comments (13)
i will figure it out, thanks!
you can try to disable the types check temporarily:
export { default as React } from "https://esm.sh/[email protected]?no-check";
export { default as ReactDOM } from "https://esm.sh/[email protected]?no-check";
from esm.sh.
@quaos deno bundle src/client.tsx public/assets/js/client.js
without --config
seems works fine in my case:
can you please post the tsconfig.json
?
from esm.sh.
@ije Here:
tsconfig.json
{
"compilerOptions": {
"isolatedModules": false,
"allowJs": false,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"alwaysStrict": true,
"checkJs": false,
"disableSizeLimit": false,
"jsx": "react",
"jsxFactory": "React.createElement",
"lib": ["DOM", "ESNext"],
"noFallthroughCasesInSwitch": false,
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noImplicitUseStrict": false,
"noStrictGenericChecks": false,
"noUnusedLocals": false,
"noUnusedParameters": false,
"removeComments": false,
"strict": true,
"strictBindCallApply": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"strictPropertyInitialization": true,
"suppressExcessPropertyErrors": false,
"suppressImplicitAnyIndexErrors": false
},
"deno": true
}
In my case, omitting --config
still yields the same errors, with more errors about jsx added in:
TS17004 [ERROR]: Cannot use JSX unless the '--jsx' flag is provided.
<App />,
from esm.sh.
i will figure it out, thanks!
you can try to disable the types check temporarily:
export { default as React } from "https://esm.sh/[email protected]?no-check"; export { default as ReactDOM } from "https://esm.sh/[email protected]?no-check";
Thanks, the bundle succeeded with ?no-check
!
However, the result client.js
still has error in browser:
Uncaught ReferenceError: __react is not defined
at require (client.js:370)
from esm.sh.
i guess this is a bug of deno bundler.
from esm.sh.
FYI please check denoland/deno#8344
from esm.sh.
@quaos to get react render details error message, you can use esm.sh's dev
mode:
import _React from 'https://esm.sh/[react,react-dom]/react?dev'
import _ReactDOM from 'https://esm.sh/[react,react-dom]/react-dom?dev'
export const React = _React
export const ReactDOM = _ReactDOM
from esm.sh.
@ije Somewhat after using development mode, the error is gone and React components loaded successfully now.
import _React from 'https://esm.sh/[react,react-dom]/react?dev&no-check';
import _ReactDOM from 'https://esm.sh/[react,react-dom]/react-dom?dev&no-check';
from esm.sh.
cool, what deno version you are using? i don't need no-check
flag in deno 1.5.2
from esm.sh.
consider use Aleph.js ?
from esm.sh.
@ije I also uses 1.5.2, but do not work without no-check
>deno --version
deno 1.5.2 (71d7482, release, x86_64-pc-windows-msvc)
v8 8.7.220.3
typescript 4.0.5
However, this is the repo I've been working on:
deno-react-minimal-frontend
from esm.sh.
cool!
from esm.sh.
@ije So I suppose you can close this issue for now 😎
from esm.sh.
Related Issues (20)
- Wrong X-Typescript-Types url for `@vueuse/shared` HOT 1
- Failed to import - primereact (alias cannot contain slashes) HOT 2
- Feature request - download lists HOT 5
- Invalid response status code
- Failed to import - @mui/icons-material/DeleteOutline HOT 1
- Failed to init CLI on Deno HOT 1
- Feature request - SSE for package new version HOT 2
- No versions available for esm-node-services HOT 9
- "esmLexer: invalid syntax, require javascript/typescript" on valid file HOT 5
- Not possible to import a React client component in Next.JS via esm.sh
- Use custom node polyfill via `alias` and `external` query
- @observablehq/plot prototypes are missing a method due to skipped side effects
- Support GitHub Gists
- Failed to import - d3
- Failed init cli on NPM HOT 7
- Support importing modules from jsr.io HOT 1
- how to get react profiling version
- Failed to import - basehub/react - shows 500 Internal Server Error. - on commit
- Failed to import - @mui/material HOT 6
- Failed to import - openlayers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esm.sh.