Skip to content
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

Support Analog (Angular/Vite/Nitro based) #20608

Open
birkskyum opened this issue Sep 21, 2023 · 5 comments
Open

Support Analog (Angular/Vite/Nitro based) #20608

birkskyum opened this issue Sep 21, 2023 · 5 comments
Labels
bug Something isn't working correctly node compat

Comments

@birkskyum
Copy link
Contributor

birkskyum commented Sep 21, 2023

Analog - GitHub - Website

Deno 2.0.2

Status:

  • ✅ init
  • ✅ deno task dev
  • ❌ deno task build

Related to:

@birkskyum birkskyum changed the title Support Analog Support Analog (Angular/Vite/Nitro based) Sep 21, 2023
@bartlomieju bartlomieju added bug Something isn't working correctly node compat labels Sep 22, 2023
@birkskyum
Copy link
Contributor Author

birkskyum commented May 30, 2024

✅ Update: Resolved - PostCSS works now

With Deno 1.44 and:

  • deno run -A npm:create-analog@latest
  • pnpm i
  • DENO_FUTURE=1 deno task dev

Hitting this PostCSS (CommonJS) issue now:

➜ DENO_FUTURE=1 deno task dev
Task dev ng serve
error: Uncaught (in promise) Failed to load PostCSS config: Failed to load PostCSS config (searchPath: /Users/admin/repos/deno-kitchensink/analog-p2): [ReferenceError] module is not defined
ReferenceError: module is not defined
    at file:///Users/admin/repos/deno-kitchensink/analog-p2/postcss.config.cjs:1:1
module.exports = {
^
    at file:///Users/admin/repos/deno-kitchensink/analog-p2/postcss.config.cjs:1:1

@birkskyum
Copy link
Contributor Author

birkskyum commented Sep 15, 2024

✅ Update: Resolved - create works now

With Deno 2-rc.2 and:

  • deno run -A npm:create-analog@latest
  • deno install
  • deno task dev
➜ deno install
error: npm package 'uWebSockets.js' does not exist.

@birkskyum
Copy link
Contributor Author

birkskyum commented Sep 18, 2024

✅ Update: Resolved - counter works now

deno 2.0.0-rc.2+aaf2bf4 If using

pnpm create analog@latest
pnpm install
deno task dev

The dev server loads, but the counter doesn't work

Screenshot 2024-09-18 at 02 26 41

@birkskyum
Copy link
Contributor Author

birkskyum commented Sep 24, 2024

✅ Update: Resolved - The build doesn't stagnate:

The build stagnates:

➜ deno task build
Task build ng build
vite v5.4.7 building for production...
transforming (1) index.html

@birkskyum
Copy link
Contributor Author

birkskyum commented Oct 18, 2024

❌ On build there's Rollup error. I haven't seen this before, it looks like a deno_web bug to me.

Repro:

  • deno run -A npm:create-analog@latest (select anything, e.g. no tailwind, blog)
  • deno i

.. And then:

  • deno task build (breaks, see below log)
  • npm run build (works)
                                                                                         
Task build ng build
vite v5.4.9 building for production...
✓ 320 modules transformed.
dist/client/index.html                             1.03 kB │ gzip:  0.62 kB
dist/client/assets/index-CDCuFZaW.css              6.20 kB │ gzip:  1.86 kB
dist/client/assets/index.page-Dqlg1Fns.js          1.22 kB │ gzip:  0.72 kB
dist/client/assets/analogjs-content-BVRyEv5u.js   98.18 kB │ gzip: 33.73 kB
dist/client/assets/index-EBuhhR_t.js             287.39 kB │ gzip: 91.12 kB
✓ built in 3.31s
Building SSR application...
vite v5.4.9 building SSR bundle for production...
✓ 31 modules transformed.
dist/ssr/assets/index.page-5vYAHD_E.js            2.23 kB
dist/ssr/assets/analogjs-content-Bs6cK2kP.js     22.68 kB
dist/ssr/assets/xhr2-DUKzHHNY.js                 36.21 kB
dist/ssr/main.server.js                       1,519.67 kB
✓ built in 4.96s
Prerendering static pages...
Building Server...

 ERROR  RollupError: Error loading "raw:/Users/admin/repos/deno-kitchensink/analog-4/dist/client/favicon.ico": plugin load hook should return a string, a { code, map } object, or nothing/null.                                   nitro 1:10:53 AM


undefined

An unhandled exception occurred: Error loading "raw:/Users/admin/repos/deno-kitchensink/analog-4/dist/client/favicon.ico": plugin load hook should return a string, a { code, map } object, or nothing/null.
See "/private/var/folders/8y/htw2q5ss5ms9zy4z8rfv393c0000gn/T/ng-wFu5A6/angular-errors.log" for further details.
error: Uncaught TypeError: Cannot set properties of undefined (setting 'target')
    at setTarget (ext:deno_web/02_event.js:97:29)
    at dispatchEvent (ext:deno_web/02_event.js:1029:7)
    at dispatchBeforeUnloadEvent (ext:runtime_main/js/99_main.js:429:22)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly node compat
Projects
None yet
Development

No branches or pull requests

2 participants