Could not read source map for … ENOENT: no such file or directory
1 min readSep 22, 2020
The error occurred in Bebug Console.
Could not read source map for file:///Users//functions/node_modules/@google-cloud/firestore/build/src/transaction.js: ENOENT: no such file or directory, open '/Users/.../functions/node_modules/@google-cloud/firestore/build/src/transaction.js.map'Could not read source map for file:///Users/.../functions/node_modules/@google-cloud/firestore/build/src/v1/index.js: ENOENT: no such file or directory, open '/Users/.../functions/node_modules/@google-cloud/firestore/build/src/v1/index.js.map'Could not read source map for file:///Users/.../functions/node_modules/@google-cloud/firestore/build/src/v1/firestore_admin_client.js: ENOENT: no such file or directory, open '/Users/.../functions/node_modules/@google-cloud/firestore/build/src/v1/firestore_admin_client.js.map'Could not read source map for file:///Users/.../functions/node_modules/@google-cloud/firestore/build/src/v1/firestore_client.js: ENOENT: no such file or directory, open '/Users/.../functions/node_modules/@google-cloud/firestore/build/src/v1/firestore_client.js.map'
Solution
Replace your launch.json to this.
{
"version": "0.2.0",
"configurations": [
{
"type": "pwa-node",
"request": "attach",
"name": "Attach",
"port": 9229,
"restart": true,
"skipFiles": ["<node_internals>/**"],
"sourceMaps": true,
"resolveSourceMapLocations": [
"${workspaceFolder}/**",
"!**/node_modules/**"
]
}
]
}
There is an unrelated one, the “restart” option. It is for the problem of the pipe-broken with the firebase emulator and “ — inspect-functions” option.