500 Error on publish: Unable to resolve module '/$.html'

#1

I updated my ejected project from Expo 26 to Expo 29. I use yarn with the following package.json. My build machine started erroring on publish and trying it on my machine with the following command line. The first time it seemed to start building, then it it error-ed out at the end. It finished almost immediately after that.

EXPO_DEBUG=true exp publish --release-channel prod --non-interactive -c
{
  "name": "biopointe",
  "version": "0.1.0",
  "private": true,
  "devDependencies": {
    "@xkeshi/vue-qrcode": "^1.0.0",
    "babel-core": "^6.25.0",
    "babel-gettext-extractor": "^3.0.0",
    "babel-loader": "^7.1.4",
    "babel-plugin-transform-runtime": "^6.23.0",
    "babel-polyfill": "^6.26.0",
    "babel-preset-expo": "^4.0.0",
    "bootstrap": "^4.1.1",
    "command-exists": "^1.2.2",
    "css-loader": "^1.0.0",
    "esdoc": "1.0.1",
    "esdoc-ecmascript-proposal-plugin": "^1.0.0",
    "esdoc-jsx-plugin": "^1.0.0",
    "esdoc-standard-plugin": "^1.0.0",
    "file-loader": "^1.1.11",
    "fs-extra": "^5.0.0",
    "gettext-parser": "^1.3.0",
    "glob": "^7.1.2",
    "jest-expo": "^29.0.0",
    "jest-fetch-mock": "^1.2.1",
    "jest-html-reporter": "^2.0.0",
    "jquery": "^3.3.1",
    "node-fetch": "^1.7.3",
    "popper.js": "^1.14.3",
    "react-native-mock": "^0.3.1",
    "react-native-mock-render": "^0.1.0",
    "react-test-renderer": "16.3.1",
    "style-loader": "^0.21.0",
    "tar": "^4.1.1",
    "vue": "^2.5.16",
    "vue-barcode": "^1.1.0",
    "vue-loader": "^15.2.4",
    "vue-save-state": "^1.2.0",
    "vue-template-compiler": "^2.5.16",
    "webpack": "^4.12.0",
    "webpack-cli": "^3.0.8"
  },
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "exp start",
    "test": "jest --watch --coverage",
    "i18n": "node ./locales/extract.js",
    "pages": "webpack && esdoc && cp -r coverage/ test-report.html public/",
    "install": "node expokit.js"
  },
  "jest": {
    "preset": "jest-expo",
    "testResultsProcessor": "./node_modules/jest-html-reporter",
    "snapshotSerializers": [
      "./src/BioPointe.serializer.js"
    ]
  },
  "dependencies": {
    "await-mutex": "^1.0.1",
    "crypto-js": "^3.1.9-1",
    "events": "^1.1.1",
    "expo": "^29.0.0",
    "expokit": "^1.4.0",
    "lodash": "^4.17.4",
    "moment": "^2.18.1",
    "node-gettext": "^2.0.0",
    "react": "16.3.1",
    "react-native": "https://github.com/expo/react-native/archive/sdk-29.0.0.tar.gz",
    "react-native-background-fetch": "^2.4.2",
    "react-native-background-geolocation": "^2.12.2",
    "react-native-camera": "0.6",
    "react-native-img-button": "^1.0.1",
    "react-native-keyboard-aware-scroll-view": "^0.3.0",
    "react-native-open-maps": "^0.1.0",
    "react-native-picker-dropdown": "^0.1.1",
    "react-native-section-list-get-item-layout": "^2.2.2",
    "react-navigation": "^2.9.3",
    "sentry-expo": "~1.9.0",
    "url": "^0.11.0",
    "uuid": "^3.1.0",
    "xmldom": "^0.1.27"
  }
}
[17:04:20] Publishing to channel 'prod'...
[17:04:22] Building iOS bundle
[17:04:22] 500 - REDACTED_SEE_BELOW
    at new StatusCodeError (/usr/local/share/.config/yarn/global/node_modules/request-promise-core/lib/errors.js:32:15)
    at Request.plumbing.callback (/usr/local/share/.config/yarn/global/node_modules/request-promise-core/lib/plumbing.js:104:33)
    at Request.RP$callback [as _callback] (/usr/local/share/.config/yarn/global/node_modules/request-promise-core/lib/plumbing.js:46:31)
    at Request.self.callback (/usr/local/share/.config/yarn/global/node_modules/request/request.js:186:22)
    at Request.emit (events.js:180:13)
    at Request.<anonymous> (/usr/local/share/.config/yarn/global/node_modules/request/request.js:1163:10)
    at Request.emit (events.js:180:13)
    at IncomingMessage.<anonymous> (/usr/local/share/.config/yarn/global/node_modules/request/request.js:1085:12)
    at Object.onceWrapper (events.js:272:13)
    at IncomingMessage.emit (events.js:185:15)

The redacted JSON object, cleaned up so it can be read more easily.

{
  "originModulePath": "${PROJECT_DIR}/node_modules/await-mutex/node_modules/core-js/library/modules/$.task.js",
  "targetModuleName": "./$.html",
  "message": "Unable to resolve module `./$.html` from `${PROJECT_DIR}/node_modules/await-mutex/node_modules/core-js/library/modules/$.task.js`: The module `./$.html` could not be found from `${PROJECT_DIR}/node_modules/await-mutex/node_modules/core-js/library/modules/$.task.js`. Indeed, none of these files exist:\n\n  *`$.html`\n  * `${PROJECT_DIR}/node_modules/await-mutex/node_modules/core-js/library/modules/$.html/index(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json)`",
  "errors": [
    {
      "description": "Unable to resolve module `./$.html` from `${PROJECT_DIR}/node_modules/await-mutex/node_modules/core-js/library/modules/$.task.js`: The module `./$.html` could not be found from `${PROJECT_DIR}/node_modules/await-mutex/node_modules/core-js/library/modules/$.task.js`. Indeed, none of these files exist:\n\n  * `$.html`\n  * `${PROJECT_DIR}/node_modules/await-mutex/node_modules/core-js/library/modules/$.html/index(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json)`"
    }
  ],
  "name": "Error",
  "stack": "Error: Unable to resolve module `./$.html` from `${PROJECT_DIR}/node_modules/await-mutex/node_modules/core-js/library/modules/$.task.js`: The module `./$.html` could not be found from `${PROJECT_DIR}/node_modules/await-mutex/node_modules/core-js/library/modules/$.task.js`. Indeed, none of these files exist:\n\n  * `$.html`\n  * `${PROJECT_DIR}/node_modules/await-mutex/node_modules/core-js/library/modules/$.html/index(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json)`\n    at ModuleResolver.resolveDependency (${PROJECT_DIR}/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:161:851)\n    at ResolutionRequest.resolveDependency (${PROJECT_DIR}/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:91:16)\n    at DependencyGraph.resolveDependency (${PROJECT_DIR}/node_modules/metro/src/node-haste/DependencyGraph.js:272:4579)\n    at dependencies.map.relativePath (${PROJECT_DIR}/node_modules/metro/src/DeltaBundler/traverseDependencies.js:376:19)\n    at Array.map (<anonymous>)\n    at resolveDependencies (${PROJECT_DIR}/node_modules/metro/src/DeltaBundler/traverseDependencies.js:374:16)\n    at ${PROJECT_DIR}/node_modules/metro/src/DeltaBundler/traverseDependencies.js:212:33\n    at Generator.next (<anonymous>)\n    at step (${PROJECT_DIR}/node_modules/metro/src/DeltaBundler/traverseDependencies.js:297:313)\n    at ${PROJECT_DIR}/node_modules/metro/src/DeltaBundler/traverseDependencies.js:297:473"
}
#2

I don’t know why I didn’t see it in development, but it was from await-mutex@1.0.2, reverting to await-mutex@1.0.1 fixed it.

I posted an issue about it

closed #3

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.