Hi Developers.
I am new to the DHIS2 development, and i am trying to setup the development environment on my local machine, but i still have some problems, below are the details:
O.S: Windows 11 Pro
Node: 18.12.0
npm: 8.19.2
yarn: 1.22.21
d2: 4.2.4
Result for running this command:
See details
PS C:\Users\HP\Desktop\dhis2Development> d2 app scripts init aaaa
`
Importing d2.config.js defaults
No package.json found, creating one…
Creating package scripts…
Installing @dhis2/cli-app-scripts…
warning …\package.json: No license field
warning @dhis2/cli-app-scripts > @babel/plugin-proposal-nullish-coalescing-operator@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.
warning @dhis2/cli-app-scripts > @babel/plugin-proposal-class-properties@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.
warning @dhis2/cli-app-scripts > @babel/plugin-proposal-optional-chaining@7.21.0: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.
warning @dhis2/cli-app-scripts > workbox-build@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-webpack-plugin@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-webpack-plugin > workbox-build@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > @dhis2/app-shell > react-scripts > workbox-webpack-plugin@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > @dhis2/cli-helpers-engine > request@2.88.2: request has been deprecated, see Request’s Past, Present and Future · Issue #3142 · request/request · GitHub
warning @dhis2/cli-app-scripts > i18next-scanner > acorn-dynamic-import@4.0.0: This is probably built in to whatever tool you’re using. If you still need it… idk
warning @dhis2/cli-app-scripts > i18next-scanner > acorn-stage3 > acorn-dynamic-import@4.0.0: This is probably built in to whatever tool you’re using. If you still need it… idk
warning @dhis2/cli-app-scripts > workbox-build > rollup-plugin-terser@7.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser
warning @dhis2/cli-app-scripts > workbox-build > workbox-background-sync@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-broadcast-update@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-cacheable-response@6.6.1: workbox-background-sync@6.6.1
warning @dhis2/cli-app-scripts > workbox-build > workbox-core@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > @dhis2/app-shell > @dhis2/pwa > workbox-core@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-background-sync > workbox-core@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-broadcast-update > workbox-core@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-cacheable-response > workbox-core@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-expiration@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-expiration > workbox-core@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-navigation-preload@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-navigation-preload > workbox-core@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-range-requests@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-range-requests > workbox-core@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-recipes@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-recipes > workbox-cacheable-response@6.6.1: workbox-background-sync@6.6.1
warning @dhis2/cli-app-scripts > workbox-build > workbox-recipes > workbox-core@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-recipes > workbox-expiration@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-routing@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > @dhis2/app-shell > @dhis2/pwa > workbox-routing@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-recipes > workbox-routing@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-routing > workbox-core@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-strategies@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > @dhis2/app-shell > @dhis2/pwa > workbox-strategies@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-recipes > workbox-strategies@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-strategies > workbox-core@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-streams@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-streams > workbox-core@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-streams > workbox-routing@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-precaching@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > @dhis2/app-shell > @dhis2/pwa > workbox-precaching@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-recipes > workbox-precaching@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-precaching > workbox-core@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-precaching > workbox-routing@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-precaching > workbox-strategies@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-google-analytics@6.6.1: It is not compatible with newer versions of GA starting with v4, as long as you are using GAv3 it should be ok, but the package is not longer being maintained
warning @dhis2/cli-app-scripts > workbox-build > workbox-google-analytics > workbox-background-sync@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-google-analytics > workbox-core@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-google-analytics > workbox-routing@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-google-analytics > workbox-strategies@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-sw@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-window@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > workbox-build > workbox-window > workbox-core@6.6.1: this package has been deprecated
warning @dhis2/cli-app-scripts > @dhis2/app-shell > react-scripts > babel-preset-react-app > @babel/plugin-proposal-class-properties@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.
warning @dhis2/cli-app-scripts > @dhis2/app-shell > react-scripts > babel-preset-react-app > @babel/plugin-proposal-nullish-coalescing-operator@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.
warning @dhis2/cli-app-scripts > @dhis2/app-shell > react-scripts > babel-preset-react-app > @babel/plugin-proposal-optional-chaining@7.21.0: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.
warning @dhis2/cli-app-scripts > @dhis2/cli-helpers-engine > request > har-validator@5.1.5: this library is no longer supported
warning @dhis2/cli-app-scripts > @dhis2/cli-helpers-engine > request > 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 There’s Math.random(), and then there’s Math.random() · V8 for details.
warning @dhis2/cli-app-scripts > react-dev-utils > fork-ts-checker-webpack-plugin > memfs@3.6.0: this will be v4
warning @dhis2/cli-app-scripts > webpack-dev-server > webpack-dev-middleware > memfs@3.6.0: this will be v4
warning @dhis2/cli-app-scripts > i18next-scanner > acorn-stage3 > acorn-bigint@0.4.0: acorn>=6.2 supports bigint
warning @dhis2/cli-app-scripts > i18next-scanner > acorn-stage3 > acorn-logical-assignment@0.1.4: acorn>=7.4 supports logical assignments
warning @dhis2/cli-app-scripts > i18next-scanner > acorn-stage3 > acorn-export-ns-from@0.1.0: acorn>=7.2 supports export-ns-from
warning @dhis2/cli-app-scripts > i18next-scanner > acorn-stage3 > acorn-import-meta@1.1.0: acorn>=7.2 supports import-meta
warning @dhis2/cli-app-scripts > i18next-scanner > acorn-stage3 > acorn-numeric-separator@0.3.6: acorn>=7.4 supports numeric separators
warning @dhis2/cli-app-scripts > @dhis2/app-shell > react-scripts > babel-preset-react-app > @babel/plugin-proposal-numeric-separator@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead.
warning @dhis2/cli-app-scripts > @dhis2/app-shell > react-scripts > babel-preset-react-app > @babel/plugin-proposal-private-methods@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-methods instead.
warning @dhis2/cli-app-scripts > @dhis2/app-shell > react-scripts > source-map-loader > abab@2.0.6: Use your platform’s native atob() and btoa() methods instead
warning @dhis2/cli-app-scripts > @jest/core > jest-config > jest-environment-jsdom > jsdom > abab@2.0.6: Use your platform’s native atob() and btoa() methods instead
warning @dhis2/cli-app-scripts > workbox-build > @rollup/plugin-replace > magic-string > sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
warning @dhis2/cli-app-scripts > @jest/core > jest-config > jest-environment-jsdom > jsdom > data-urls > abab@2.0.6: Use your platform’s native atob() and btoa() methods instead
warning @dhis2/cli-app-scripts > @jest/core > jest-config > jest-environment-jsdom > jsdom > domexception@2.0.1: Use your platform’s native DOMException instead
warning @dhis2/cli-app-scripts > @jest/core > jest-config > jest-environment-jsdom > jsdom > w3c-hr-time@1.0.2: Use your platform’s native performance.now() and performance.timeOrigin.
warning @dhis2/cli-app-scripts > @dhis2/app-shell > react-scripts > @svgr/webpack > @svgr/plugin-svgo > svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
warning @dhis2/cli-app-scripts > @dhis2/app-shell > react-scripts > @svgr/webpack > @svgr/plugin-svgo > svgo > stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: Array.prototype.sort() - JavaScript | MDN
warning @dhis2/cli-app-scripts > css-minimizer-webpack-plugin > cssnano > cssnano-preset-default > postcss-svgo > svgo > stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: Array.prototype.sort() - JavaScript | MDN
warning “@dhis2/cli-app-scripts > postcss-loader@7.3.4” has unmet peer dependency “postcss@^7.0.0 || ^8.0.1”.
warning “@dhis2/cli-app-scripts > styled-jsx@4.0.1” has unmet peer dependency “react@>= 16.8.0 || 17.x.x || 18.x.x”.
warning “@dhis2/cli-app-scripts > react-dev-utils > fork-ts-checker-webpack-plugin@6.5.3” has unmet peer dependency “typescript@>= 2.7”.
warning “@dhis2/cli-app-scripts > @dhis2/app-shell > react-scripts > eslint-config-react-app > eslint-plugin-flowtype@8.0.3” has unmet peer dependency “@babel/plugin-syntax-flow@^7.14.5”.
warning “@dhis2/cli-app-scripts > @dhis2/app-shell > react-scripts > eslint-config-react-app > eslint-plugin-flowtype@8.0.3” has unmet peer dependency “@babel/plugin-transform-react-jsx@^7.14.9”.
warning “@dhis2/cli-app-scripts > @dhis2/app-shell > @dhis2/ui > @dhis2-ui/calendar > @dhis2/multi-calendar-dates@1.0.2” has incorrect peer dependency “react@16.8”.
warning “@dhis2/cli-app-scripts > @dhis2/app-shell > @dhis2/ui > @dhis2-ui/calendar > @dhis2/multi-calendar-dates@1.0.2” has incorrect peer dependency “react-dom@16.8”.
Installing @dhis2/app-runtime…
warning …\package.json: No license field
warning “@dhis2/cli-app-scripts > postcss-loader@7.3.4” has unmet peer dependency “postcss@^7.0.0 || ^8.0.1”.
warning “@dhis2/cli-app-scripts > styled-jsx@4.0.1” has unmet peer dependency “react@>= 16.8.0 || 17.x.x || 18.x.x”.
warning " > @dhis2/app-runtime@3.10.2" has unmet peer dependency “prop-types@^15.7.2”.
warning " > @dhis2/app-runtime@3.10.2" has unmet peer dependency “react@^16.8.6”.
warning " > @dhis2/app-runtime@3.10.2" has unmet peer dependency “react-dom@^16.8.6”.
warning “@dhis2/cli-app-scripts > react-dev-utils > fork-ts-checker-webpack-plugin@6.5.3” has unmet peer dependency “typescript@>= 2.7”.
warning “@dhis2/app-runtime > @dhis2/app-service-alerts@3.10.2” has unmet peer dependency “prop-types@^15.7.2”.
warning “@dhis2/app-runtime > @dhis2/app-service-alerts@3.10.2” has unmet peer dependency “react@^16.8.6”.
warning “@dhis2/app-runtime > @dhis2/app-service-alerts@3.10.2” has unmet peer dependency “react-dom@^16.8.6”.
warning “@dhis2/app-runtime > @dhis2/app-service-config@3.10.2” has unmet peer dependency “prop-types@^15.7.2”.
warning “@dhis2/app-runtime > @dhis2/app-service-config@3.10.2” has unmet peer dependency “react@^16.8.6”.
warning “@dhis2/app-runtime > @dhis2/app-service-config@3.10.2” has unmet peer dependency “react-dom@^16.8.6”.
warning “@dhis2/app-runtime > @dhis2/app-service-data@3.10.2” has unmet peer dependency “prop-types@^15.7.2”.
warning “@dhis2/app-runtime > @dhis2/app-service-data@3.10.2” has unmet peer dependency “react@^16.8”.
warning “@dhis2/app-runtime > @dhis2/app-service-data@3.10.2” has unmet peer dependency “react-dom@^16.8”.
warning “@dhis2/app-runtime > @dhis2/app-service-offline@3.10.2” has unmet peer dependency “prop-types@^15.7.2”.
warning “@dhis2/app-runtime > @dhis2/app-service-offline@3.10.2” has unmet peer dependency “react@^16.8.6”.
warning “@dhis2/app-runtime > @dhis2/app-service-offline@3.10.2” has unmet peer dependency “react-dom@^16.8.6”.
warning “@dhis2/app-runtime > @dhis2/app-service-plugin@3.10.2” has unmet peer dependency “prop-types@^15.7.2”.
warning “@dhis2/app-runtime > @dhis2/app-service-plugin@3.10.2” has unmet peer dependency “react@^16.8.6”.
warning “@dhis2/app-runtime > @dhis2/app-service-plugin@3.10.2” has unmet peer dependency “react-dom@^16.8.6”.
warning “@dhis2/cli-app-scripts > @dhis2/app-shell > @dhis2/ui > @dhis2-ui/calendar > @dhis2/multi-calendar-dates@1.0.2” has incorrect peer dependency “react@16.8”.
warning “@dhis2/cli-app-scripts > @dhis2/app-shell > @dhis2/ui > @dhis2-ui/calendar > @dhis2/multi-calendar-dates@1.0.2” has incorrect peer dependency “react-dom@16.8”.
warning “@dhis2/cli-app-scripts > @dhis2/app-shell > react-scripts > eslint-config-react-app > eslint-plugin-flowtype@8.0.3” has unmet peer dependency “@babel/plugin-syntax-flow@^7.14.5”.
warning “@dhis2/cli-app-scripts > @dhis2/app-shell > react-scripts > eslint-config-react-app > eslint-plugin-flowtype@8.0.3” has unmet peer dependency “@babel/plugin-transform-react-jsx@^7.14.9”.
Creating entrypoint src/App.js
Updating .gitignore…
Writing README…
SUCCESS!
Run cd aaaa && yarn start to launch your new DHIS2 application
`
Result for running:
PS C:\Users\HP\Desktop\dhis2Development> cd .\aaaa
PS C:\Users\HP\Desktop\dhis2Development\aaaa> yarn start
`
yarn run v1.22.21
warning …\package.json: No license field
$ d2-app-scripts start
Generating internationalization strings…
Writing 2 language strings to ./i18n\en.pot…
Bootstrapping local appShell…
Copying appShell to temporary directory…
Building app aaaa…
Generating manifests…
Starting development server…
The app aaaa is now available on port 3000
warning …....\package.json: No license field
node:internal/modules/cjs/loader:998
throw err;
^
Error: Cannot find module ‘C:\Users\HP\Desktop\dhis2Development\aaaa\react-scripts\bin\react-scripts.js’
at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
at Module._load (node:internal/modules/cjs/loader:841:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47 {
code: ‘MODULE_NOT_FOUND’,
requireStack:
}
Node.js v18.12.0
error Command failed with exit code 1.
node:events:491
throw er; // Unhandled ‘error’ event
^
Error: spawn yarn ENOENT
at notFoundError (C:\Users\HP\Desktop\dhis2Development\aaaa\node_modules\cross-spawn\lib\enoent.js:6:26)
at verifyENOENT (C:\Users\HP\Desktop\dhis2Development\aaaa\node_modules\cross-spawn\lib\enoent.js:40:16)
at cp.emit (C:\Users\HP\Desktop\dhis2Development\aaaa\node_modules\cross-spawn\lib\enoent.js:27:25)
at ChildProcess._handle.onexit (node:internal/child_process:291:12)
Emitted ‘error’ event on ChildProcess instance at:
at cp.emit (C:\Users\HP\Desktop\dhis2Development\aaaa\node_modules\cross-spawn\lib\enoent.js:30:37)
at ChildProcess._handle.onexit (node:internal/child_process:291:12) {
code: ‘ENOENT’,
errno: ‘ENOENT’,
syscall: ‘spawn yarn’,
path: ‘yarn’,
spawnargs: [ ‘run’, ‘start’ ]
}
Node.js v18.12.0
error Command failed with exit code 1.
info Visit yarn run | Yarn for documentation about this command.
`