Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSC Does Not Run On Path To TSConfig.JSON Synced To SharePoint Library #142479

Closed
mavigozler opened this issue Feb 8, 2022 · 1 comment
Closed
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) tasks Task system issues typescript Typescript support issues

Comments

@mavigozler
Copy link

mavigozler commented Feb 8, 2022

Issue Type: Bug

Issue: when attempting to build (transpile) JS files from TS files using tsc on a tsconfig.json file whose path is created by a sync to a SharePoint document library (folder) via OneDrive, the following terminal output is observed:

> Executing task in folder mhteam - SP Tools: tsc -b 'd:\dev\SharePoint\SPOSite\<SP-tenant-name>\<SP-site-name> - <SP-library-name>\tsconfig.json' <

error TS5072: Unknown build option '-'.

The terminal process "C:\WINDOWS\System32\cmd.exe /d /c tsc -b 'd:\dev\SharePoint\SPOSite\<SP-tenant-name>\<SP-site-name> - <SP-library-name>\tsconfig.json'" terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

The path-to-tsconfig.json file is as follows:
d:\dev\SharePoint\SPOSite is the attachment point for sync of the SharePoint document library via OneDrive
<SP-tenant-name> is the obscured name of the tenant name XXXX.sharepoint.com where XXXX = <SP-tenant-name>. This naming action for the path element is done by OneDrive syncing process.
• The <SP-site-name> - <SP-library-name> path element is the obscured names of the site (actual name: 'mhteam') and the document library (actual name: 'SP Tools'). This naming action is done by OneDrive syncing process.

Renaming the path elements associated with/created by OneDrive syncing is not possible.
Note the path-to-tsconfig.json argument enclosed by single quotes, which would be assumed to prevent the TS compiler from interpreting space characters as separate arguments and the hyphen character as designating an option (argument) to the application.

• Question posted on sharepoint.stackexchange.com with this issue went unanswered after 3 days: https://sharepoint.stackexchange.com/questions/300261/can-path-to-tsconfig-json-for-vs-code-be-to-synced-sharepoint-document-library
• VSCode started with option --disable-extensions temporarily shows same error: would presume this is not caused by any extension.
• GitHub issues filter setting 'is:issue is:open tsc' shows 42 open, 954 closed. The 42 open issues do not describe this issue.
• GitHub issues filter setting 'is:issue sharepoint' show 3 open (no relevance), 468 closed (too many to inspect)
• GitHub issues filter setting 'is:issue sharepoint sync' show 0 open, 7 closed (no relevance)
• the SharePoint subscription is an M365 E5 Developer account

Steps to reproduce:

  1. Create a document library (or use existing library like "Site Assets") or a folder within a document library in a SharePoint site
  2. Take a folder or workspace that is properly configured and functional--that is, in Code, it properly builds a TypeScript project (transpiles to *.JS) and proves that its tsconfig.json is without defect, and drag-n-drop upload to the SharePoint document library to root level folder or containing subfolder. Check that the working tree has been copied for all files.
  3. Find the Sync command on the top menu bar for the SharePoint library and select it.
  4. OneDrive opens up a dialog to attach/link the reference to the point in the SharePoint doc lib or its subfolder to a default location in the Windows file system, usually C:\Users\username\... with the option of the user directing to another location in the filesystem. In the present case, the attachment point was to d:\dev\SharePoint\SPOSite, a path created for that attachment point.
  5. Open Code, and then open the workspace file from the Open dialog.
  6. Configure the build task: 'tsc build - tsconfig (folder name)'
  7. Run the build task: at this point the error is observed in the Terminal panel.

Version: 1.64.0 (user setup)
Commit: 5554b12
Date: 2022-02-03T04:22:20.678Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.22000

VS Code version: Code 1.64.0 (5554b12, 2022-02-03T04:22:20.678Z)
OS version: Windows_NT x64 10.0.22000
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz (8 x 1190)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 11.82GB (5.62GB free)
Process Argv --crash-reporter-id 72770bc9-9704-4ad5-8690-6709345d0a89
Screen Reader no
VM 0%
Extensions (25)
Extension Author (truncated) Version
better-comments aar 2.1.0
project-manager ale 12.4.0
gitignore cod 0.7.0
vscode-eslint dba 2.2.2
githistory don 0.6.19
gitlens eam 11.7.0
vscode-html-css ecm 1.11.0
code-runner for 0.11.6
start-git-bash McC 1.2.1
vscode-language-babel mgm 0.0.36
vscode-edge-devtools ms- 1.4.3
python ms- 2022.0.1786462952
powershell ms- 2021.12.0
powershell-preview ms- 2022.2.0
debugger-for-edge msj 1.0.15
deepdark-material Nim 3.3.0
binary-viewer Qia 1.1.1
LiveServer rit 5.7.4
shell-launcher Tyr 0.4.1
vscode-icons vsc 11.8.0
vscode-todo-highlight way 1.0.5
eno Wsc 2.3.53
JavaScriptSnippets xab 1.8.0
markdown-all-in-one yzh 3.4.0
vscode-open-in-github ziy 1.3.6

(1 theme extensions excluded)

A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30425749
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805:30301674
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
vsc1dsc:30433058
pythonvs932:30410667
wslgetstartedc:30433508
vs360:30404995
vsrem710:30416614
vscscmwlcmt:30433761

@mjbvz
Copy link
Collaborator

mjbvz commented Feb 9, 2022

Thanks for the report. This looks like a duplicate of #142196 (also #142449)

We're investigating but you can follow those issues for updates

@mjbvz mjbvz closed this as completed Feb 9, 2022
@mjbvz mjbvz added *duplicate Issue identified as a duplicate of another issue(s) tasks Task system issues typescript Typescript support issues labels Feb 9, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Mar 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) tasks Task system issues typescript Typescript support issues
Projects
None yet
Development

No branches or pull requests

2 participants