Skip to content

An error occurred while trying to read the map file #15

@dan-j

Description

@dan-j

Using version 1.1.1, I get the following error and can't get round it. Downgrading to 1.1.0 fixes the issue.

It's reproducible on the most trivial example:

$ yarn add -D ts-babel-node

index.ts:

console.log('hello world');

$ ts-babel-node index.ts

/repo/node_modules/convert-source-map/index.js:40
    throw new Error('An error occurred while trying to read the map file at ' + filepath + '\n' + e);
    ^

Error: An error occurred while trying to read the map file at /repo/data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiL1VzZXJzL0Rhbi9Eb2N1bWVudHMvZ2l0X3JlcG9zL3RzLXJlYWN0LWV4cHJlc3Mtc3RhcnRlci9pbmRleC50cyIsInNvdXJjZXMiOlsiL1VzZXJzL0Rhbi9Eb2N1bWVudHMvZ2l0X3JlcG9zL3RzLXJlYWN0LWV4cHJlc3Mtc3RhcnRlci9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxDQUFDLEdBQUcsQ0FBQyxhQUFhLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImNvbnNvbGUubG9nKCdoZWxsbyB3b3JsZCcpO1xuIl19
Error: ENOENT: no such file or directory, open '/repo/data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiL1VzZXJzL0Rhbi9Eb2N1bWVudHMvZ2l0X3JlcG9zL3RzLXJlYWN0LWV4cHJlc3Mtc3RhcnRlci9pbmRleC50cyIsInNvdXJjZXMiOlsiL1VzZXJzL0Rhbi9Eb2N1bWVudHMvZ2l0X3JlcG9zL3RzLXJlYWN0LWV4cHJlc3Mtc3RhcnRlci9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxDQUFDLEdBQUcsQ0FBQyxhQUFhLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImNvbnNvbGUubG9nKCdoZWxsbyB3b3JsZCcpO1xuIl19'
    at readFromFileMap (/repo/node_modules/convert-source-map/index.js:40:11)
    at new Converter (/repo/node_modules/convert-source-map/index.js:47:32)
    at Object.exports.fromMapFileComment (/repo/node_modules/convert-source-map/index.js:110:10)
    at Object.exports.fromMapFileSource (/repo/node_modules/convert-source-map/index.js:122:22)
    at Module.compile (/repo/node_modules/ts-babel-node/index.js:46:36)
    at Module.<anonymous> (/repo/node_modules/ts-babel-node/index.js:89:15)
    at Module.m._compile (/repo/node_modules/ts-node/dist/index.js:219:29)
    at Module._extensions..js (module.js:580:10)
    at require.extensions.(anonymous function) (/repo/node_modules/ts-node/dist/index.js:221:16)
    at Object.hook (/repo/node_modules/ts-babel-node/index.js:42:3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions