We have recently changed from npm to yarn. Yarn is included in corepack which is bundled with Node.js > 16.10, but is currently opt-in. To enable corepack simply run corepack enable. For further instructions please see the yarn installation guide.
There is also some cleanup needed to be done. These steps can be skipped if you have cloned a fresh copy, or if you are sure you are already using yarn in this repository. If you are unsure, you can follow the steps anyway.
- From this folder (
src/designer/frontend) Executenpx rimraf **/node_modules/**. This will remove anynode_modulesunder each workspace (dashboard, app-development, shared, ux-editor, packages/schema-editor), and thenode_modulesin this project root (frontend) folder. - Execute
yarn --immutablefrom this project root.
For other commands executed with npm (f.ex npm run test), you should now use yarn instead (f.ex yarn run test).
- Navigate to the folder
src/Altinn.Apps/AppFrontend/react. - Execute
yarn --immutable. This step is only nescessary if you have not already done it, or if you change branches. - Execute
yarn run lint.
- Navigate to the folder
src/Altinn.Apps/AppFrontend/react. - Execute
yarn --immutable. This step is only nescessary if you have not already done it, or if you change branches. - Execute
yarn run test.