Closed adrianocr closed 2 years ago
This works again in newer packer versions, but specifically if Packer is installed directly into the project instead of globally. To run the various packer commands you need to use your package manager instead of the global packer command. Ex: yarn start
runs the local project's packer instead of the global installation.
Describe the bug These days it is common to install node via a version manager such as https://github.com/nvm-sh/nvm or https://volta.sh/. NVM works but is quite slow compared to Volta.
Right now packer works perfectly via NVM. But it does NOT work via volta. Packer installs globally correctly and you can issue packer commands inside your project, but packer fails to build files due to "missing loaders". Webpack fires up warnings about loaders being missing for SCSS files. If you manually add the loaders, the issue still persists.
This same issue does not happen with NVM. In fact if you have both installed you can easily swap between nvm and volta by having your .bashrc or .zshrc file reference/load one or the other. If you load nvm and run
packer build
in the directory, everything works swimmingly. If you swap to volta and runpacker build
, you all of a sudden get the webpack loader errors. This still happens if you remove the node_modules directory and reinstall all packages from scratch.To Reproduce Steps to reproduce the behavior:
volta install node
volta install yarn
yarn global add @hayes0724/shopify-packer
orvolta install @hayes0724/shopify-packer
yarn install
within your project's directorypacker build
within your project's directoryExpected behavior I expect packer to build and bundle everything correctly as it does through a standard node install. What currently happens is a myriad of errors stating that loaders are missing. If I manually add the loaders, and add the rules for the necessary file type (.scss files in this case) to the webpack config in the dev.config file or prod.config file, the issues still persists.
Screenshots
System (please complete the following information):
Packer (please complete the following information):