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

Repo example for express cannot find module '@swc/core' #40

Closed
gtarsia opened this issue Apr 18, 2022 · 1 comment
Closed

Repo example for express cannot find module '@swc/core' #40

gtarsia opened this issue Apr 18, 2022 · 1 comment

Comments

@gtarsia
Copy link

gtarsia commented Apr 18, 2022

From examples/express I had to first delete yarn.lock because I got this output:

yarn install v1.22.18
[1/4] Resolving packages...
[2/4] Fetching packages...
error https://registry.yarnpkg.com/vite-plugin-node/-/vite-plugin-node-0.0.19.tgz: Integrity check failed for "vite-plugin-node" (computed integrity doesn't match our records, got "sha512-Nwindxk2nfp9ZQZQovmKr+wdBH+17Czf8PUo+sAABnmOtebtE4Zo+Dq055SA5CPzLVVWylJ454k98BH4TpMhZA== sha1-e6eYblHkijap8RnfxSFlfvHM12I=")
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

After deleting yarn.lock and running yarn I got:

failed to load config from /home/romigui/git/vite-plugin-node/examples/express/vite.config.ts
error when starting dev server:
Error: Cannot find module '@swc/core'
Require stack:
- /home/romigui/git/vite-plugin-node/examples/express/node_modules/vite-plugin-node/dist/rollup-plugin-swc.js
- /home/romigui/git/vite-plugin-node/examples/express/node_modules/vite-plugin-node/dist/index.js
- /home/romigui/git/vite-plugin-node/examples/express/vite.config.ts
- /home/romigui/git/vite-plugin-node/examples/express/node_modules/vite/dist/node/chunks/dep-27bc1ab8.js
- /home/romigui/git/vite-plugin-node/examples/express/node_modules/vite/dist/node/cli.js
- /home/romigui/git/vite-plugin-node/examples/express/node_modules/vite/bin/vite.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
    at Function.Module._load (internal/modules/cjs/loader.js:746:27)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:101:18)
    at Object.<anonymous> (/home/romigui/git/vite-plugin-node/examples/express/node_modules/vite-plugin-node/dist/rollup-plugin-swc.js:5:16)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19)

If I add @swc/core, it does work.

@JiPaix
Copy link

JiPaix commented Apr 18, 2022

duplicate of #36

@gtarsia gtarsia closed this as completed Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants