I using SmartClient Pro 13.0 and I'm trying to use it with Node.js
But when I'm following the instructions
$ npm init
$ npm install -S smartclient-node
npm WARN deprecated natives@1.1.6: This module relies on Node.js's internals and will break at some point. Do not use it, and update to graceful-fs@4.x.
npm WARN deprecated multer@1.4.4: Multer 1.x is affected by CVE-2022-24434. This is fixed in v1.4.4-lts.1 which drops support for versions of Node.js before 6. Please upgrade to at least Node.js 6 and version 1.4.4-lts.1 of Multer. If you need support for older versions of Node.js, we are open to accepting patches that would fix the CVE on the main 1.x release line, whilst maintaining compatibility with Node.js 0.10.
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup 'C:\\xxx\\my-app\\node_modules\\dtrace-provider',
npm WARN cleanup [Error: EBUSY: resource busy or locked, rmdir 'C:\xxx\my-app\node_modules\dtrace-provider'] {
npm WARN cleanup errno: -4082,
npm WARN cleanup code: 'EBUSY',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\\xxx\\my-app\\node_modules\\dtrace-provider'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup 'C:\\xxx\\my-app\\node_modules',
npm WARN cleanup [Error: EBUSY: resource busy or locked, rmdir 'C:\xxx\my-app\node_modules\dtrace-provider'] {
npm WARN cleanup errno: -4082,
npm WARN cleanup code: 'EBUSY',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\\xxx\\my-app\\node_modules\\dtrace-provider'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\xxx\my-app\node_modules\smartclient-node
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node install.js
npm ERR! fs.js:42
npm ERR! } = primordials;
npm ERR! ^
npm ERR!
npm ERR! ReferenceError: primordials is not defined
npm ERR! at fs.js:42:5
npm ERR! at req_ (C:\xxx\my-app\node_modules\natives\index.js:143:24)
npm ERR! at Object.req [as require] (C:\xxx\my-app\node_modules\natives\index.js:55:10)
npm ERR! at Object.<anonymous> (C:\xxx\my-app\node_modules\fstream\node_modules\graceful-fs\fs.js:1:37)
npm ERR! at Module._compile (node:internal/modules/cjs/loader:1254:14)
npm ERR! at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
npm ERR! at Module.load (node:internal/modules/cjs/loader:1117:32)
npm ERR! at Module._load (node:internal/modules/cjs/loader:958:12)
npm ERR! at Module.require (node:internal/modules/cjs/loader:1141:19)
npm ERR! at require (node:internal/modules/cjs/helpers:110:18)
npm ERR!
npm ERR! Node.js v18.14.2
The only way I can make the installation work is if I create a React app
$ npx create-react-app my-app
$ npm install smartclient-pro --username=... --password=...
Is that the way it is supposed to work? If yes, can you please provide a complete example exactly where in the React-code to put the smartclient-components?
But when I'm following the instructions
$ npm init
$ npm install -S smartclient-node
npm WARN deprecated natives@1.1.6: This module relies on Node.js's internals and will break at some point. Do not use it, and update to graceful-fs@4.x.
npm WARN deprecated multer@1.4.4: Multer 1.x is affected by CVE-2022-24434. This is fixed in v1.4.4-lts.1 which drops support for versions of Node.js before 6. Please upgrade to at least Node.js 6 and version 1.4.4-lts.1 of Multer. If you need support for older versions of Node.js, we are open to accepting patches that would fix the CVE on the main 1.x release line, whilst maintaining compatibility with Node.js 0.10.
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup 'C:\\xxx\\my-app\\node_modules\\dtrace-provider',
npm WARN cleanup [Error: EBUSY: resource busy or locked, rmdir 'C:\xxx\my-app\node_modules\dtrace-provider'] {
npm WARN cleanup errno: -4082,
npm WARN cleanup code: 'EBUSY',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\\xxx\\my-app\\node_modules\\dtrace-provider'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup 'C:\\xxx\\my-app\\node_modules',
npm WARN cleanup [Error: EBUSY: resource busy or locked, rmdir 'C:\xxx\my-app\node_modules\dtrace-provider'] {
npm WARN cleanup errno: -4082,
npm WARN cleanup code: 'EBUSY',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\\xxx\\my-app\\node_modules\\dtrace-provider'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\xxx\my-app\node_modules\smartclient-node
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node install.js
npm ERR! fs.js:42
npm ERR! } = primordials;
npm ERR! ^
npm ERR!
npm ERR! ReferenceError: primordials is not defined
npm ERR! at fs.js:42:5
npm ERR! at req_ (C:\xxx\my-app\node_modules\natives\index.js:143:24)
npm ERR! at Object.req [as require] (C:\xxx\my-app\node_modules\natives\index.js:55:10)
npm ERR! at Object.<anonymous> (C:\xxx\my-app\node_modules\fstream\node_modules\graceful-fs\fs.js:1:37)
npm ERR! at Module._compile (node:internal/modules/cjs/loader:1254:14)
npm ERR! at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
npm ERR! at Module.load (node:internal/modules/cjs/loader:1117:32)
npm ERR! at Module._load (node:internal/modules/cjs/loader:958:12)
npm ERR! at Module.require (node:internal/modules/cjs/loader:1141:19)
npm ERR! at require (node:internal/modules/cjs/helpers:110:18)
npm ERR!
npm ERR! Node.js v18.14.2
The only way I can make the installation work is if I create a React app
$ npx create-react-app my-app
$ npm install smartclient-pro --username=... --password=...
Is that the way it is supposed to work? If yes, can you please provide a complete example exactly where in the React-code to put the smartclient-components?
Comment