CSVファイルを作成したいのですが、エラーが出てうまくいきません。
VSCodeで実行(F5)すると下記のエラーがでます。
エラー:Cannnot launch program 'C\User...; setting the 'outFiles' attribute might help.
コードは間違ってないと思いますが、現在node.jsを使っているので、これが原因の可能性があると思い、VSCodeのターミナルでclasp logoutを実行しましたが、解消されませんでした。
エラーメッセージにOpen launch.jsonのボタンがあり、クリックするとlaunch.jsonが開きますが、特にエラーもなく、私にはどこに問題があるかわかりませんでした。
Js
1// CSV作成 2let blob = new Blob(['ABC'],{type:"text/csv"}); 3let link = document.createElement('a'); 4link.href = URL.createObjectURL(blob); 5link.download = 'made from vscode.csv'; 6link.click();
JSON
1{ 2 // launch.json 3 // Use IntelliSense to learn about possible attributes. 4 // Hover to view descriptions of existing attributes. 5 // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 6 "version": "0.2.0", 7 "configurations": [ 8 { 9 "type": "node", 10 "request": "launch", 11 "name": "Launch Program", 12 "skipFiles": [ 13 "<node_internals>/**" 14 ], 15 "program": "${workspaceFolder}\spreadsheet connection test.ts" 16 } 17 ] 18}
下記の内容が類似していると思い、launch.jsonの最後の行の"program": "${work...を削除したところ、エラーが無くなりましたが、依然としてCSVファイルは生成されません。なにか根本的に間違っている部分があるのでしょうか。。。
Bad message: Cannot launch program 'c:...'; setting the 'outFiles' attribute might help. #28257
cmd
1# Prepare the project directory 2mkdir generator && cd generator 3# Install its dependency 4npm install csv-generate 5# Write a sample module 6cat > generator.js <<JS 7// Require the csv module 8const generate = require('csv-generate') 9// Print 10 records 10generate({length: 10}).pipe(process.stdout) 11JS 12# Execute the module 13node generator.js
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/05/20 12:39
2020/05/20 13:01
2020/05/20 13:03
2020/05/20 13:06
2020/05/20 13:11
2020/05/20 13:21 編集
2020/05/20 13:26
2020/05/20 13:30
2020/08/19 19:58