-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
😱 BugSomething isn't workingSomething isn't working
Description
Describe the bug
Impossible to launch middleware
error stacktrace
> simple.webplatform@3.0.0 start
> concurrently "npx tsx src/api/index.ts" "vite"
[1] /Users/kevinchapuis/Development/PROJECTS/IRiMa/TsunamiVR/simple.webplatform-main/node_modules/rollup/dist/native.js:86
[1] throw new Error(
[1] ^
[1]
[1] Error: Cannot find module @rollup/rollup-darwin-arm64. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.
[1] at requireWithFriendlyError (/Users/kevinchapuis/Development/PROJECTS/IRiMa/TsunamiVR/simple.webplatform-main/node_modules/rollup/dist/native.js:86:9)
[1] at Object.<anonymous> (/Users/kevinchapuis/Development/PROJECTS/IRiMa/TsunamiVR/simple.webplatform-main/node_modules/rollup/dist/native.js:95:76)
[1] at Module._compile (node:internal/modules/cjs/loader:1761:14)
[1] at Object..js (node:internal/modules/cjs/loader:1893:10)
[1] at Module.load (node:internal/modules/cjs/loader:1481:32)
[1] at Module._load (node:internal/modules/cjs/loader:1300:12)
[1] at TracingChannel.traceSync (node:diagnostics_channel:328:14)
[1] at wrapModuleLoad (node:internal/modules/cjs/loader:245:24)
[1] at loadCJSModuleWithModuleLoad (node:internal/modules/esm/translators:339:3)
[1] at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:242:7) {
[1] [cause]: Error: Cannot find module '@rollup/rollup-darwin-arm64'
[1] Require stack:
[1] - /Users/kevinchapuis/Development/PROJECTS/IRiMa/TsunamiVR/simple.webplatform-main/node_modules/rollup/dist/native.js
[1] at Module._resolveFilename (node:internal/modules/cjs/loader:1421:15)
[1] at defaultResolveImpl (node:internal/modules/cjs/loader:1059:19)
[1] at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1064:22)
[1] at Module._load (node:internal/modules/cjs/loader:1227:37)
[1] at TracingChannel.traceSync (node:diagnostics_channel:328:14)
[1] at wrapModuleLoad (node:internal/modules/cjs/loader:245:24)
[1] at Module.require (node:internal/modules/cjs/loader:1504:12)
[1] at require (node:internal/modules/helpers:152:16)
[1] at requireWithFriendlyError (/Users/kevinchapuis/Development/PROJECTS/IRiMa/TsunamiVR/simple.webplatform-main/node_modules/rollup/dist/native.js:68:10)
[1] at Object.<anonymous> (/Users/kevinchapuis/Development/PROJECTS/IRiMa/TsunamiVR/simple.webplatform-main/node_modules/rollup/dist/native.js:95:76) {
[1] code: 'MODULE_NOT_FOUND',
[1] requireStack: [
[1] '/Users/kevinchapuis/Development/PROJECTS/IRiMa/TsunamiVR/simple.webplatform-main/node_modules/rollup/dist/native.js'
[1] ]
[1] }
[1] }
[1]
[1] Node.js v24.13.0
[1] vite exited with code 1
[0]
[0] node:internal/modules/run_main:107
[0] triggerUncaughtException(
[0] ^
[0] Error [TransformError]:
[0] You installed esbuild for another platform than the one you're currently using.
[0] This won't work because esbuild is written with native code and needs to
[0] install a platform-specific binary executable.
[0]
[0] Specifically the "@esbuild/darwin-x64" package is present but this platform
[0] needs the "@esbuild/darwin-arm64" package instead. People often get into this
[0] situation by installing esbuild with npm running inside of Rosetta 2 and then
[0] trying to use it with node running outside of Rosetta 2, or vice versa (Rosetta
[0] 2 is Apple's on-the-fly x86_64-to-arm64 translation service).
[0]
[0] If you are installing with npm, you can try ensuring that both npm and node are
[0] not running under Rosetta 2 and then reinstalling esbuild. This likely involves
[0] changing how you installed npm and/or node. For example, installing node with
[0] the universal installer here should work: https://nodejs.org/en/download/. Or
[0] you could consider using yarn instead of npm which has built-in support for
[0] installing a package on multiple platforms simultaneously.
[0]
[0] If you are installing with yarn, you can try listing both "arm64" and "x64"
[0] in your ".yarnrc.yml" file using the "supportedArchitectures" feature:
[0] https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
[0] Keep in mind that this means multiple copies of esbuild will be present.
[0]
[0] Another alternative is to use the "esbuild-wasm" package instead, which works
[0] the same way on all platforms. But it comes with a heavy performance cost and
[0] can sometimes be 10x slower than the "esbuild" package, so you may also not
[0] want to do that.
[0]
[0] at generateBinPath (/Users/kevinchapuis/Development/PROJECTS/IRiMa/TsunamiVR/simple.webplatform-main/node_modules/esbuild/lib/main.js:1739:17)
[0] at esbuildCommandAndArgs (/Users/kevinchapuis/Development/PROJECTS/IRiMa/TsunamiVR/simple.webplatform-main/node_modules/esbuild/lib/main.js:1820:33)
[0] at ensureServiceIsRunning (/Users/kevinchapuis/Development/PROJECTS/IRiMa/TsunamiVR/simple.webplatform-main/node_modules/esbuild/lib/main.js:1977:25)
[0] at transform (/Users/kevinchapuis/Development/PROJECTS/IRiMa/TsunamiVR/simple.webplatform-main/node_modules/esbuild/lib/main.js:1878:37)
[0] at file:///Users/kevinchapuis/Development/PROJECTS/IRiMa/TsunamiVR/simple.webplatform-main/node_modules/tsx/dist/index-7AaEi15b.mjs:14:2865
[0] at applyTransformers (file:///Users/kevinchapuis/Development/PROJECTS/IRiMa/TsunamiVR/simple.webplatform-main/node_modules/tsx/dist/index-7AaEi15b.mjs:14:1266)
[0] at transform (file:///Users/kevinchapuis/Development/PROJECTS/IRiMa/TsunamiVR/simple.webplatform-main/node_modules/tsx/dist/index-7AaEi15b.mjs:14:2812)
[0] at load (file:///Users/kevinchapuis/Development/PROJECTS/IRiMa/TsunamiVR/simple.webplatform-main/node_modules/tsx/dist/esm/index.mjs?1769177625521:2:2348)
[0] at async nextLoad (node:internal/modules/esm/hooks:785:22)
[0] at async AsyncLoaderHooksOnLoaderHookWorker.load (node:internal/modules/esm/hooks:410:20)
[0]
[0] Node.js v24.13.0
[0] npx tsx src/api/index.ts exited with code 1
Desktop (please complete the following information):
- Device: Apple M1 Max
- OS: MacOS Tahoe 26.2
Additional context
kevinchapuis@MacBook-Pro-4 simple.webplatform-main % npm -v
11.8.0
Metadata
Metadata
Assignees
Labels
😱 BugSomething isn't workingSomething isn't working