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

"Whops The URL must be of scheme file" error while trying to build the code on windows #4102

Closed
arunthirumani opened this issue Dec 23, 2021 · 11 comments · Fixed by #4223
Closed
Assignees
Labels
Bot Services Required for internal Azure reporting. Do not delete. Do not change color. bug Indicates an unexpected problem or an unintended behavior. customer-replied-to Required for internal reporting. Do not delete. customer-reported Required for internal Azure reporting. Do not delete.

Comments

@arunthirumani
Copy link

Please view our Technical Support Guide before filing a new issue.

Screenshots

Version

To determine what version of Web Chat you are running, open your browser's development tools, and paste the following line of code into the console.

[].map.call(document.head.querySelectorAll('meta[name^="botframework-"]'), function (meta) { return meta.outerHTML; }).join('\n')

If you are using Web Chat outside of a browser, please specify your hosting environment. For example, React Native on iOS, Cordova on Android, SharePoint, PowerApps, etc.

Describe the bug

Steps to reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

Additional context

[Bug]
TypeError [ERR_INVALID_URL_SCHEME]: The URL must be of scheme file
at mkdirSync (node:fs:1318:10)
at default (file:///D:/opensource/BotFramework-WebChat/packages/support/cldr-data-downloader/src/index.js:50:5)
at node:internal/util:335:7
at new Promise ()
at default (node:internal/util:321:12)
at file:///D:/opensource/BotFramework-WebChat/packages/support/cldr-data/src/install.mjs:133:11 {
code: 'ERR_INVALID_URL_SCHEME'

Getting this error while trying to build code in my windows desktop.(Windows 10 Pro)

@arunthirumani arunthirumani added Bot Services Required for internal Azure reporting. Do not delete. Do not change color. bug Indicates an unexpected problem or an unintended behavior. customer-reported Required for internal Azure reporting. Do not delete. labels Dec 23, 2021
@breakingram
Copy link
Contributor

Hey @arunthirumani, Thanks for the question. Additional info is needed. Could you please provide code snippets or steps to reproduce this issue?

@arunthirumani
Copy link
Author

@ramfattah thank you for the quick response,

steps to reproduce:

  1. clone the repository to desktop
  2. execute below commands
    npm ci
    npm run bootstrap

@LeeParrishMSFT LeeParrishMSFT added the customer-replied-to Required for internal reporting. Do not delete. label Dec 28, 2021
@breakingram
Copy link
Contributor

I was able to repro this issue and getting the same error "Whops The URL must be of scheme file" after running npm run bootstrap. Below is my repro steps:

  1. git clone https://github.com/microsoft/BotFramework-WebChat.git
  2. cd BotFramework-WebChat && npm install
  3. npm ci
  4. npm run bootstrap

Terminal stack trace


> [email protected] bootstrap
> lerna bootstrap --ci

lerna notice cli v4.0.0
lerna info ci enabled
lerna info Bootstrapping 13 packages
lerna info Symlinking packages and binaries
lerna info lifecycle [email protected]~install: [email protected]

> [email protected] install C:\Users\ramfa\Documents\Bots\BotFramework-WebChat\packages\support\cldr-data
> node ./src/install.mjs

Whops The URL must be of scheme file
node:internal/errors:464
    ErrorCaptureStackTrace(err);
    ^

TypeError [ERR_INVALID_URL_SCHEME]: The URL must be of scheme file
    at mkdirSync (node:fs:1327:10)
    at default (file:///C:/Users/ramfa/Documents/Bots/BotFramework-WebChat/packages/support/cldr-data-downloader/src/index.js:50:5)
    at node:internal/util:360:7
    at new Promise (<anonymous>)
    at default (node:internal/util:346:12)
    at file:///C:/Users/ramfa/Documents/Bots/BotFramework-WebChat/packages/support/cldr-data/src/install.mjs:133:11 {
  code: 'ERR_INVALID_URL_SCHEME'
}
lerna info lifecycle [email protected]~install: Failed to exec install script
lerna ERR! lifecycle "install" errored in "cldr-data", exiting 1

@stevkan
Copy link
Collaborator

stevkan commented Jan 5, 2022

I was able to repro (sort of) as I didn't get that same error. But, running npm bootstrap did fail for me. Working from a clean clone of the repo, my attempt failed an integrity check.

> [email protected] bootstrap
> lerna bootstrap --ci

lerna notice cli v4.0.0
lerna info ci enabled
lerna info Bootstrapping 13 packages
lerna info Installing external dependencies
lerna ERR! npm ci --legacy-peer-deps exited 1 in 'botframework-webchat-core'
lerna ERR! npm ci --legacy-peer-deps stderr:
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN old lockfile Error: Integrity checksum failed when using sha512: wanted sha512-R1PXiz31Uc0Vxy4OEOm07x0oSjKAdPPCh3tPivn/Eo8cvz6gveAeuyUUPB21Hoiif0uoPQSSdhIPS3352nvdyQ== but got sha512-hprxVPu6e5Kdp2puZUmvOGjaLv9TCe58E/Fl6hRq4YiVQxIcNvuq6uTM2r1mT/oPskuS9CgR+I94sqAYv0NGKA==.
npm WARN old lockfile     at C:\Program Files\nodejs\node_modules\npm\node_modules\pacote\lib\registry.js:145:39
npm WARN old lockfile     at async Array.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:741:9)
npm WARN old lockfile  Could not fetch metadata for @babel/[email protected] Error: Integrity checksum failed when using sha512: wanted sha512-R1PXiz31Uc0Vxy4OEOm07x0oSjKAdPPCh3tPivn/Eo8cvz6gveAeuyUUPB21Hoiif0uoPQSSdhIPS3352nvdyQ== but got sha512-hprxVPu6e5Kdp2puZUmvOGjaLv9TCe58E/Fl6hRq4YiVQxIcNvuq6uTM2r1mT/oPskuS9CgR+I94sqAYv0NGKA==.
npm WARN old lockfile     at C:\Program Files\nodejs\node_modules\npm\node_modules\pacote\lib\registry.js:145:39
npm WARN old lockfile     at async Array.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:741:9) {
npm WARN old lockfile   code: 'EINTEGRITY'
npm WARN old lockfile }
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm ERR! code 1
npm ERR! path C:\Users\Steven Kanberg\source\WebChat\BotFramework-WebChat\packages\core\node_modules\p-defer-es5
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c npm run postinstall:commonjs && npm run postinstall:esm
npm ERR! > [email protected] postinstall:commonjs
npm ERR! > node ./scripts/esbuild.mjs p-defer ./src/index.js cjs ./lib/index.bundled.js && babel ./lib/index.bundled.js --config-file ./babel.config.commonjs.json --out-file ./lib/index.js
npm ERR! node:events:368
npm ERR!       throw er; // Unhandled 'error' event
npm ERR!       ^
npm ERR!
npm ERR! Error: spawn C:\Users\Steven Kanberg\source\WebChat\BotFramework-WebChat\packages\core\node_modules\esbuild\esbuild.exe ENOENT
npm ERR!     at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
npm ERR!     at onErrorNT (node:internal/child_process:477:16)
npm ERR!     at processTicksAndRejections (node:internal/process/task_queues:83:21)
npm ERR! Emitted 'error' event on ChildProcess instance at:
npm ERR!     at Process.ChildProcess._handle.onexit (node:internal/child_process:288:12)
npm ERR!     at onErrorNT (node:internal/child_process:477:16)
npm ERR!     at processTicksAndRejections (node:internal/process/task_queues:83:21) {
npm ERR!   errno: -4058,
npm ERR!   code: 'ENOENT',
npm ERR!   syscall: 'spawn C:\\Users\\Steven Kanberg\\source\\WebChat\\BotFramework-WebChat\\packages\\core\\node_modules\\esbuild\\esbuild.exe',
npm ERR!   path: 'C:\\Users\\Steven Kanberg\\source\\WebChat\\BotFramework-WebChat\\packages\\core\\node_modules\\esbuild\\esbuild.exe',
npm ERR!   spawnargs: [ '--service=0.12.19', '--ping' ]
npm ERR! }

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Steven~1\AppData\Roaming\npm-cache\_logs\2022-01-05T20_27_11_053Z-debug.log
lerna ERR! npm ci --legacy-peer-deps exited 1 in 'botframework-webchat-core'
lerna WARN complete Waiting for 7 child processes to exit. CTRL-C to exit immediately.

@breakingram
Copy link
Contributor

Hey @compulim, can you take a look at this?

@breakingram breakingram assigned compulim and unassigned breakingram Jan 5, 2022
@carlosscastro
Copy link
Member

@compulim could you please pick this one up?

@msomanathan
Copy link

@compulim Could you please provide updates to this issue? Thanks!

@compulim
Copy link
Contributor

@ramfattah What version of Node.js are you using to build?

To build, we requires Node 14 or 16 (current LTS), which supports ES Modules.

@breakingram
Copy link
Contributor

hey @compulim

I'm using Node v16.0.0 and npm v8.5.5, Windows 10 OS.

I tried to build the project by following this documentation , after entering npm run bootstrap, the following error is thrown:
image

@anjalinitd
Copy link

Facing same issue, do we hace any mitigation?

@compulim
Copy link
Contributor

I am looking into this.

I guess it could be related to platform issue, where we use WSL2 (Linux) and didn't try it out on Windows.

@compulim compulim mentioned this issue Mar 28, 2022
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bot Services Required for internal Azure reporting. Do not delete. Do not change color. bug Indicates an unexpected problem or an unintended behavior. customer-replied-to Required for internal reporting. Do not delete. customer-reported Required for internal Azure reporting. Do not delete.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants