Skip to content

Malformed expo-modules-core in StackBlitz Node.js #1881

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

Open
1 task done
scottannan opened this issue May 27, 2025 · 0 comments
Open
1 task done

Malformed expo-modules-core in StackBlitz Node.js #1881

scottannan opened this issue May 27, 2025 · 0 comments

Comments

@scottannan
Copy link

Describe the bug

Expo's expo-modules-core package consistently installs malformed (index.js is null, build/ directory is missing .js files) in StackBlitz Node.js environments.

Link to the blitz that caused the error

https://stackblitz.com/edit/stackblitz-starters-rsmog8fz?description=Starter%20project%20for%20Node.js,%20a%20JavaScript%20runtime%20built%20on%20Chrome%27s%20V8%20JavaScript%20engine&file=index.js&title=node.new%20Starter

Steps to reproduce

  1. Go to https://node.new
  2. Open the terminal.
  3. Run the commands:
npm install expo@~52.0.0 expo-router@latest [email protected] [email protected] [email protected] react-native-web@~0.19.6
npx expo init --no-install # Choose "blank"
npm install
echo "module.exports = function(api) { api.cache(true); return { presets: ['babel-preset-expo'], }; };" > babel.config.js
echo "const { getDefaultConfig } = require('@expo/metro-config'); const config = getDefaultConfig(__dirname, { isCSSEnabled: true, }); module.exports = config;" > metro.config.js
head -n 10 node_modules/expo-modules-core/index.js
ls node_modules/expo-modules-core/build/

The output is incorrect:
module.exports = null;
& within the file, the js files have not been compiled:
EventEmitter.d.ts SharedObject.d.ts.map
EventEmitter.d.ts.map SharedRef.d.ts
LegacyEventEmitter.d.ts SharedRef.d.ts.map
LegacyEventEmitter.d.ts.map TypedArrays.types.d.ts
NativeModule.d.ts TypedArrays.types.d.ts.map
NativeModule.d.ts.map ensureNativeModulesAreInstalled.d.ts
NativeModulesProxy.d.ts ensureNativeModulesAreInstalled.d.ts.map
NativeModulesProxy.d.ts.map environment/
NativeModulesProxy.native.d.ts errors/
NativeModulesProxy.native.d.ts.map hooks/
NativeModulesProxy.types.d.ts index.d.ts
NativeModulesProxy.types.d.ts.map index.d.ts.map
NativeViewManagerAdapter.d.ts registerWebModule.d.ts
NativeViewManagerAdapter.d.ts.map registerWebModule.d.ts.map
NativeViewManagerAdapter.native.d.ts reload.d.ts
NativeViewManagerAdapter.native.d.ts.map reload.d.ts.map
PermissionsHook.d.ts requireNativeModule.d.ts
PermissionsHook.d.ts.map requireNativeModule.d.ts.map
PermissionsInterface.d.ts requireNativeModule.web.d.ts
PermissionsInterface.d.ts.map requireNativeModule.web.d.ts.map
Platform.d.ts sweet/
Platform.d.ts.map ts-declarations/
Refs.d.ts uuid/
Refs.d.ts.map web/
SharedObject.d.ts

This is throwing the TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" error.

Expected behavior

The expo modules should have compiled into js files.

Parity with Local

Screenshots

No response

Platform

Browser name  = Chrome
Full version  = 136.0.0.0
Major version = 136
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36
performance.memory = {
  "totalJSHeapSize": 112169801,
  "usedJSHeapSize": 110313605,
  "jsHeapSizeLimit": 4294705152
}
Hash = 55edb8f4

Additional context

No response

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

1 participant