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

[Bug?]: TypeError: Comp is not a function #1144

Closed
2 tasks done
sysmat opened this issue Dec 16, 2023 · 5 comments
Closed
2 tasks done

[Bug?]: TypeError: Comp is not a function #1144

sysmat opened this issue Dec 16, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@sysmat
Copy link

sysmat commented Dec 16, 2023

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

> solid-start dev

 solid-start dev 
 version  0.3.10
 adapter  node

  VITE v5.0.10  ready in 1576 ms

  ➜  Local:   http://localhost:3000/
  ➜  Network: use --host to expose
  ➜  Inspect: http://localhost:3000/__inspect/
  ➜  press h + enter to show help
GET http://localhost:3000/
TypeError: Comp is not a function
    at Module.createComponent (file:///C:/Users/tomaz/Projekti/GitLab_Arnes/tomaz/typescript_solidstart_vite/node_modules/.pnpm/[email protected]/node_modules/solid-js/dist/server.js:349:15)
    at get children [as children] (C:/Users/tomaz/Projekti/GitLab_Arnes/tomaz/typescript_solidstart_vite/src/root.tsx:39:48)
    at get children [as children] (C:/Users/tomaz/Projekti/GitLab_Arnes/tomaz/typescript_solidstart_vite/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/solid-start/error-boundary/ErrorBoundary.tsx:32:20)

Expected behavior 🤔

just to work

Steps to reproduce 🕹

Steps:

  1. create app
  2. install
  3. start dev server

Context 🔦

npm init solid@latest it use very old dependency

Your environment 🌎

- OS: win 11
- node: v18.19.0
- npm: 10.2.4


"dependencies": {
    "@solidjs/meta": "0.29.3",
    "@solidjs/router": "0.10.3",
    "solid-js": "^1.8.7",
    "solid-start": "0.3.10"
  },
@sysmat sysmat added the bug Something isn't working label Dec 16, 2023
@yume-chan
Copy link
Contributor

I also hit this when upgrading dependencies. Looks like the current version of solid-start is not compatible with @solidjs/router version 0.10.x. Downgrading it to 0.9.1 fixes the issue.

@ryansolid
Copy link
Member

Yeah. Most likely the problem. I thought I marked everything properly but old Start would have an issue with 0.10.x of the router anyway.

In setting up for SolidStart's next Beta Phase built on Nitro and Vinxi we are closing all PRs/Issues that will not be merged due to the system changing. If you feel your issue was closed by mistake. Feel free to re-open it after updating/testing against 0.4.x release. Thank you for your patience.

See #1139 for more details.

@sapjax
Copy link

sapjax commented Jan 2, 2024

"@solidjs/router": "^0.10.5",
"@solidjs/start": "^0.4.2",

I also hit this problem when I am using the new start,
The problem only exists when using dynamic import() and in build mode.

@sysmat
Copy link
Author

sysmat commented Jan 13, 2024

"@solidjs/meta": "0.29.3",
"@solidjs/router": "0.10.9",
"solid-start": "0.3.10"
  • if this is seperate moduls why then are shiped togeter when to create new app
  • I create new app and then use ncu and bug is still here

@sysmat
Copy link
Author

sysmat commented Jan 13, 2024

  • for build, there is different error
solid-start building client...
vite v5.0.11 building for production...
✓ 4 modules transformed.
[vite:define] Transform failed with 1 error:
error: Invalid define value (must be an entity name or valid JSON syntax): (() => {})
file: C:/Users/tomaz/Projekti/GitLab_Arnes/tomaz/typescript_solidstart_vite/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/solid-start/entry-client/mount.tsx
C:\Users\tomaz\Projekti\GitLab_Arnes\tomaz\typescript_solidstart_vite\node_modules\.pnpm\[email protected]\node_modules\esbuild\lib\main.js:1651
  let error = new Error(text);
              ^

Error: Transform failed with 1 error:
error: Invalid define value (must be an entity name or valid JSON syntax): (() => {})
    at failureErrorWithLog (C:\Users\tomaz\Projekti\GitLab_Arnes\tomaz\typescript_solidstart_vite\node_modules\.pnpm\[email protected]\node_modules\esbuild\lib\main.js:1651:15)
    at C:\Users\tomaz\Projekti\GitLab_Arnes\tomaz\typescript_solidstart_vite\node_modules\.pnpm\[email protected]\node_modules\esbuild\lib\main.js:849:29       
    at responseCallbacks.<computed> (C:\Users\tomaz\Projekti\GitLab_Arnes\tomaz\typescript_solidstart_vite\node_modules\.pnpm\[email protected]\node_modules\esbuild\lib\main.js:704:9)
    at handleIncomingPacket (C:\Users\tomaz\Projekti\GitLab_Arnes\tomaz\typescript_solidstart_vite\node_modules\.pnpm\[email protected]\node_modules\esbuild\lib\main.js:764:9)
    at Socket.readFromStdout (C:\Users\tomaz\Projekti\GitLab_Arnes\tomaz\typescript_solidstart_vite\node_modules\.pnpm\[email protected]\node_modules\esbuild\lib\main.js:680:7)
    at Socket.emit (node:events:517:28)
    at addChunk (node:internal/streams/readable:368:12)
    at readableAddChunk (node:internal/streams/readable:341:9)
    at Readable.push (node:internal/streams/readable:278:10)
    at Pipe.onStreamRead (node:internal/stream_base_commons:190:23) {
  errors: [Getter/Setter],
  warnings: [Getter/Setter],
  code: 'PLUGIN_ERROR',
  plugin: 'vite:define',
  hook: 'transform',
  id: 'C:/Users/tomaz/Projekti/GitLab_Arnes/tomaz/typescript_solidstart_vite/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/solid-start/entry-client/mount.tsx',
  watchFiles: [
    'C:/Users/tomaz/Projekti/GitLab_Arnes/tomaz/typescript_solidstart_vite/src/entry-client.tsx',
    'C:\\Users\\tomaz\\Projekti\\GitLab_Arnes\\tomaz\\typescript_solidstart_vite\\package.json',
    'C:/Users/tomaz/Projekti/GitLab_Arnes/tomaz/typescript_solidstart_vite/node_modules/.pnpm/[email protected]/node_modules/solid-js/web/dist/web.js',
    'C:/Users/tomaz/Projekti/GitLab_Arnes/tomaz/typescript_solidstart_vite/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/solid-start/entry-client/index.tsx',
    'C:/Users/tomaz/Projekti/GitLab_Arnes/tomaz/typescript_solidstart_vite/node_modules/.pnpm/[email protected]/node_modules/solid-js/dist/solid.js',
    'C:/Users/tomaz/Projekti/GitLab_Arnes/tomaz/typescript_solidstart_vite/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/solid-start/entry-client/mount.tsx',
    'C:/Users/tomaz/Projekti/GitLab_Arnes/tomaz/typescript_solidstart_vite/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/solid-start/entry-client/StartClient.tsx'
  ]
}

Node.js v18.19.0

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

No branches or pull requests

4 participants