-
Notifications
You must be signed in to change notification settings - Fork 258
Description
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
Steps to reproduce
- Go to https://node.new
- Open the terminal.
- Run the commands:
npm install expo@~52.0.0 expo-router@latest react@18.2.0 react-dom@18.2.0 react-native@0.73.6 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
- I have run the project in my local machine and I could not reproduce the issue.
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