You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>unpack output C:\Users\windows\Desktop\source\static\js\main.60f996d4.chunk.js.map
Unpacking 🛍 your source maps 🗺
node:fs:590
handleErrorFromBinding(ctx);
^
Error: EISDIR: illegal operation on a directory, open 'C:\Users\alperen.saylar\cikmis\'
at Object.openSync (node:fs:590:3)
at Object.writeFileSync (node:fs:2202:35)
at C:\Users\alperen.saylar\AppData\Roaming\npm\node_modules\source-map-unpack\dist\index.js:47:16
at Array.forEach (<anonymous>)
at C:\Users\alperen.saylar\AppData\Roaming\npm\node_modules\source-map-unpack\dist\index.js:42:17
at C:\Users\alperen.saylar\AppData\Roaming\npm\node_modules\source-map-unpack\node_modules\source-map\lib\source-map-consumer.js:78:16 {
errno: -4068,
syscall: 'open',
code: 'EISDIR',
path: 'C:\\Users\\alperen.saylar\\cikmis\\'
}
I invested in the arrangement called here #23 but the problem persists:
if(!fs.existsSync(pathToProject)){console.log()// Create project dir if it doesn't existtry{fs.mkdirSync(projectNameInput,'0777',true)}catch(err){console.log(chalk.red(`Couldn't create project at: ${pathToProject}, please, check your permissions`))}console.log(chalk.red(`Project created at: ${pathToProject}`))console.log()process.exit()}
The full code is as follows:
#!/usr/bin/env node
"use strict";Object.defineProperty(exports,"__esModule",{value: true});varfs=require("fs");varpath=require("path");varchalk=require("chalk");varmkdirp=require("mkdirp");varminimist=require("minimist");varsource_map_1=require("source-map");varargv=minimist(process.argv.slice(2));varprojectNameInput=argv._[0];varmapInput=argv._[1];if(!projectNameInput||!mapInput){console.log();console.log(chalk.white('Usage: unpack'),chalk.green('<folder-name-to-unpack-files-to)> <path-to-map-file>'));console.log();console.log(chalk.blue('Note: Minified javascript file should be placed under path specified in .map file.'));console.log();process.exit();}varpathToProject=path.join(process.cwd(),projectNameInput);varpathToMap=path.isAbsolute(mapInput)
? mapInput
: path.join(process.cwd(),mapInput);if(!fs.existsSync(pathToProject)){console.log()// Create project dir if it doesn't existtry{fs.mkdirSync(projectNameInput,'0777',true)}catch(err){console.log(chalk.red(`Couldn't create project at: ${pathToProject}, please, check your permissions`))}console.log(chalk.red(`Project created at: ${pathToProject}`))console.log()process.exit()}if(!fs.existsSync(pathToMap)){console.log();console.log(chalk.red("Can't find map file under : "+pathToMap));console.log();process.exit();}try{varmapFile=fs.readFileSync(pathToMap,'utf8');source_map_1.SourceMapConsumer.with(mapFile,null,function(consumer){console.log(chalk.green("Unpacking \uD83D\uDECD your source\u00A0maps \uD83D\uDDFA"));varsources=consumer.sources;sources.forEach(function(source){varWEBPACK_SUBSTRING_INDEX=11;varcontent=consumer.sourceContentFor(source);varfilePath=process.cwd()+"\\"+projectNameInput+"\\"+source.substring(WEBPACK_SUBSTRING_INDEX);mkdirp.sync(path.dirname(filePath));fs.writeFileSync(filePath,content);});console.log(chalk.green('🎉 All done! Enjoy exploring your code 💻'));});}catch(err){console.log(chalk.red('Oops! Something is wrong with the source map'),err);console.log(chalk.red('Make sure .min.js is correctly placed under the path specified in .map file'));console.log('STDERR: ');console.log(err);}//# sourceMappingURL=index.js.map
The text was updated successfully, but these errors were encountered:
I'm getting the same error as here, I've tried the solutions but they didn't work for me and I'm recreating it because the issue is closed.
#22
Error:
I invested in the arrangement called here #23 but the problem persists:
The full code is as follows:
The text was updated successfully, but these errors were encountered: