build
build copied to clipboard
@netlify/sdk issues on windows while creating example application.
Describe the bug
Hi Team,
I am creating a sample application using @netlify/sdk npm package. I am getting the following errors while running npm run build/ npm run dev on Windows 11 machine. I am using node 18.17.0 version and @netlify/sdk latest version:
PS C:\Agility\netlify-connector-example> npm run build
[email protected] build ntli build -a
Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
Errored importing local @netlify/sdk module. Falling back to the globally installed bin. Upgrade your project to the latest version of @netlify/sdk to fix this error.
'rm' is not recognized as an internal or external command, operable program or batch file. node:internal/errors:865 const err = new Error(message); ^
Error: Command failed: rm -rf .ntli 'rm' is not recognized as an internal or external command, operable program or batch file.
at checkExecSyncError (node:child_process:885:11)
at execSync (node:child_process:957:15)
status: 1, signal: null, output: [ null, Buffer(0) [Uint8Array] [], Buffer(93) [Uint8Array] [ 39, 114, 109, 39, 32, 105, 115, 32, 110, 111, 116, 32, 114, 101, 99, 111, 103, 110, 105, 122, 101, 100, 32, 97, 115, 32, 97, 110, 32, 105, 110, 116, 101, 114, 110, 97, 108, 32, 111, 114, 32, 101, 120, 116, 101, 114, 110, 97, 108, 32, 99, 111, 109, 109, 97, 110, 100, 44, 13, 10, 111, 112, 101, 114, 97, 98, 108, 101, 32, 112, 114, 111, 103, 114, 97, 109, 32, 111, 114, 32, 98, 97, 116, 99, 104, 32, 102, 105, 108, 101, 46, 13, 10 ] ], pid: 8560, stdout: Buffer(0) [Uint8Array] [], stderr: Buffer(93) [Uint8Array] [ 39, 114, 109, 39, 32, 105, 115, 32, 110, 111, 116, 32, 114, 101, 99, 111, 103, 110, 105, 122, 101, 100, 32, 97, 115, 32, 97, 110, 32, 105, 110, 116, 101, 114, 110, 97, 108, 32, 111, 114, 32, 101, 120, 116, 101, 114, 110, 97, 108, 32, 99, 111, 109, 109, 97, 110, 100, 44, 13, 10, 111, 112, 101, 114, 97, 98, 108, 101, 32, 112, 114, 111, 103, 114, 97, 109, 32, 111, 114, 32, 98, 97, 116, 99, 104, 32, 102, 105, 108, 101, 46, 13, 10 ] }
Node.js v18.17.0
Steps to reproduce
I am using the documentation to create a example app on Windows 11 machine: https://sdk.netlify.com/connectors/get-started/
- PS: npm create @netlify/sdk@latest
- Need to install the following packages: @netlify/[email protected] Ok to proceed? (y) y ? Where do you want to create the integration? . ? What is the slug of the integration? (e.g. my-integration) mohit-integration ? Which boilerplate should be included? connector ? Which package manager do you want to use? npm Adding dependencies... npm WARN deprecated [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. Installing dependencies... Initialising integration... Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:' Errored importing local @netlify/sdk module. Falling back to the globally installed bin. Upgrade your project to the latest version of @netlify/sdk to fix this error.
Done! ✅ 3. npm run dev getting following error:
Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
Errored importing local @netlify/sdk module. Falling back to the globally installed bin. Upgrade your project to the latest version of @netlify/sdk to fix this error.
'rm' is not recognized as an internal or external command, operable program or batch file. node:internal/errors:865 const err = new Error(message); ^
Error: Command failed: rm -rf .ntli 'rm' is not recognized as an internal or external command, operable program or batch file.
at checkExecSyncError (node:child_process:885:11)
at execSync (node:child_process:957:15)
status: 1, signal: null, output: [ null, Buffer(0) [Uint8Array] [], Buffer(93) [Uint8Array] [ 39, 114, 109, 39, 32, 105, 115, 32, 110, 111, 116, 32, 114, 101, 99, 111, 103, 110, 105, 122, 101, 100, 32, 97, 115, 32, 97, 110, 32, 105, 110, 116, 101, 114, 110, 97, 108, 32, 111, 114, 32, 101, 120, 116, 101, 114, 110, 97, 108, 32, 99, 111, 109, 109, 97, 110, 100, 44, 13, 10, 111, 112, 101, 114, 97, 98, 108, 101, 32, 112, 114, 111, 103, 114, 97, 109, 32, 111, 114, 32, 98, 97, 116, 99, 104, 32, 102, 105, 108, 101, 46, 13, 10 ] ], pid: 18524, stdout: Buffer(0) [Uint8Array] [], stderr: Buffer(93) [Uint8Array] [ 39, 114, 109, 39, 32, 105, 115, 32, 110, 111, 116, 32, 114, 101, 99, 111, 103, 110, 105, 122, 101, 100, 32, 97, 115, 32, 97, 110, 32, 105, 110, 116, 101, 114, 110, 97, 108, 32, 111, 114, 32, 101, 120, 116, 101, 114, 110, 97, 108, 32, 99, 111, 109, 109, 97, 110, 100, 44, 13, 10, 111, 112, 101, 114, 97, 98, 108, 101, 32, 112, 114, 111, 103, 114, 97, 109, 32, 111, 114, 32, 98, 97, 116, 99, 104, 32, 102, 105, 108, 101, 46, 13, 10 ] }
Node.js v18.17.0
CLI command and flags
npm run build npm run dev
Configuration
No response
CLI output
[email protected] dev ntli dev -c
Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
Errored importing local @netlify/sdk module. Falling back to the globally installed bin. Upgrade your project to the latest version of @netlify/sdk to fix this error.
'rm' is not recognized as an internal or external command, operable program or batch file. node:internal/errors:865 const err = new Error(message); ^
Error: Command failed: rm -rf .ntli 'rm' is not recognized as an internal or external command, operable program or batch file.
at checkExecSyncError (node:child_process:885:11)
at execSync (node:child_process:957:15)
status: 1, signal: null, output: [ null, Buffer(0) [Uint8Array] [], Buffer(93) [Uint8Array] [ 39, 114, 109, 39, 32, 105, 115, 32, 110, 111, 116, 32, 114, 101, 99, 111, 103, 110, 105, 122, 101, 100, 32, 97, 115, 32, 97, 110, 32, 105, 110, 116, 101, 114, 110, 97, 108, 32, 111, 114, 32, 101, 120, 116, 101, 114, 110, 97, 108, 32, 99, 111, 109, 109, 97, 110, 100, 44, 13, 10, 111, 112, 101, 114, 97, 98, 108, 101, 32, 112, 114, 111, 103, 114, 97, 109, 32, 111, 114, 32, 98, 97, 116, 99, 104, 32, 102, 105, 108, 101, 46, 13, 10 ] ], pid: 18524, stdout: Buffer(0) [Uint8Array] [], stderr: Buffer(93) [Uint8Array] [ 39, 114, 109, 39, 32, 105, 115, 32, 110, 111, 116, 32, 114, 101, 99, 111, 103, 110, 105, 122, 101, 100, 32, 97, 115, 32, 97, 110, 32, 105, 110, 116, 101, 114, 110, 97, 108, 32, 111, 114, 32, 101, 120, 116, 101, 114, 110, 97, 108, 32, 99, 111, 109, 109, 97, 110, 100, 44, 13, 10, 111, 112, 101, 114, 97, 98, 108, 101, 32, 112, 114, 111, 103, 114, 97, 109, 32, 111, 114, 32, 98, 97, 116, 99, 104, 32, 102, 105, 108, 101, 46, 13, 10 ] }
Node.js v18.17.0
Environment
System: OS: Windows 10 10.0.22621 CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz Memory: 18.71 GB / 31.85 GB Binaries: Node: 18.17.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD npm: 9.6.7 - C:\Program Files\nodejs\npm.CMD
Appreciate the report! On it 😎
Should be fixed in 1.1.5
- I haven't spun up a windows machine to test, will do so later, but wanted to let you know!
Thanks for the update!
Hi @estephinson ,
I have installed version 1.1.5
of the @netlify/sdk, but still it seems to be not working. The following errors are there while executing the command npm run build
: -
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:' at new NodeError (node:internal/errors:405:5) at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:131:11) at defaultLoad (node:internal/modules/esm/load:82:3) at nextLoad (node:internal/modules/esm/loader:163:28) at ESMLoader.load (node:internal/modules/esm/loader:603:26) at ESMLoader.moduleProvider (node:internal/modules/esm/loader:457:22) at new ModuleJob (node:internal/modules/esm/module_job:64:26) at #createModuleJob (node:internal/modules/esm/loader:480:17) at ESMLoader.getModuleJob (node:internal/modules/esm/loader:434:34) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { code: 'ERR_UNSUPPORTED_ESM_URL_SCHEME' }