The problem:
After running npm makes aurelia in interactive mode creating template compatible to:
npx makes aurelia new-project-name -s parcel,typescript,sass
We are offered an option:
? Do you want to install npm dependencies now? » - Use arrow-keys or numbers. Return to submit.
> No
Yes, use npm
Yes, use yarn
Yes, use pnpm
After choosing yarn, packages are installed and following message displayed:
Next time, you can try to create similar project in silent mode:
npx makes aurelia new-project-name -s parcel,typescript,sass
Get Started
cd aurelia2-parcel-ts-scss-yarn
npm start
Upon running above commands, error occurs:
> aurelia2-parcel-ts-scss-yarn@0.1.0 start
> parcel -p 9000
'parcel' is not recognized as an internal or external command,
operable program or batch file.
Reason for the error
The issue happens when development machine has yarn version 2.x or higher installed and does not use node_modules folder. The behavior is called "Plug'n'Play" described here. This mode creates smallest footprint on the disk at the moment of testing - 295MB, compared to pnpm - 394MB (excluding sym-link referenced subfolders). Normal npm I did not even measure. "Plug'n'Play" also brings a lot of speed. I did not measure, but feels way faster than pnpm on initial install of packages.
Simple fix:
Perhaps "Get Started" section that is displayed after successful project scaffolding should have different text for users who selected yarn and have version 2.x or higher installed.
cd aurelia2-parcel-ts-scss-yarn
yarn start
Additional possibility - Visual Studio Code "Plug'n'Play" support.
yarn start command will do the correct work, but when using Visual Studio Code, two other improvements can be made.
As described in [Editor SDKs](yarn dlx @yarnpkg/sdks vscode) section, additional editor setup can be done by running following command:
yarn dlx @yarnpkg/sdks vscode
This will install additional package in .yarn folder and add additional configuration settings in .vscode/settings.json and extension recommendations in .vscode/extensions.json.
Perhaps option to choose editor configuration can also be added to the Aurelia scaffolding template and, when Visual Studio code is used yarn sdk integration can be executed?
The problem:
After running
npm makes aureliain interactive mode creating template compatible to:We are offered an option:
After choosing yarn, packages are installed and following message displayed:
Upon running above commands, error occurs:
Reason for the error
The issue happens when development machine has yarn version 2.x or higher installed and does not use
node_modulesfolder. The behavior is called "Plug'n'Play" described here. This mode creates smallest footprint on the disk at the moment of testing - 295MB, compared topnpm- 394MB (excluding sym-link referenced subfolders). NormalnpmI did not even measure. "Plug'n'Play" also brings a lot of speed. I did not measure, but feels way faster thanpnpmon initial install of packages.Simple fix:
Perhaps "Get Started" section that is displayed after successful project scaffolding should have different text for users who selected
yarnand have version 2.x or higher installed.cd aurelia2-parcel-ts-scss-yarn yarn startAdditional possibility - Visual Studio Code "Plug'n'Play" support.
yarn startcommand will do the correct work, but when using Visual Studio Code, two other improvements can be made.As described in [Editor SDKs](yarn dlx @yarnpkg/sdks vscode) section, additional editor setup can be done by running following command:
This will install additional package in
.yarnfolder and add additional configuration settings in.vscode/settings.jsonand extension recommendations in.vscode/extensions.json.Perhaps option to choose editor configuration can also be added to the Aurelia scaffolding template and, when Visual Studio code is used yarn sdk integration can be executed?