Rock Mountain
  • Home
  • User Guide
    • Glass Web Components
    • Using reCAPTCHA
    • Publishing Source Code with Syntax Highlighting
  • Developer Guide
    • Getting Started
    • Adding NPM Packages
    • Database
      • Backing Up and Restoring Data
      • Database Schema
      • MongoDB Tips and Snippets
      • VS Code and the MongoDB Playground
    • Common Errors and Their Solutions
    • Developing Glass Web Components
    • DevOps
      • Build and Deployment Procedure
      • GitHub Conventions and Workflow
      • Merging Preview Into Main
    • File Structure
    • React Components
      • SiteLayout Component
      • Toggle Lazy Load Image Component
    • Update or Change the Fav Icon
    • References and Learning Resources
  • Icons
Powered by GitBook
On this page
  • Permission denied when running npm run dev
  • Solutions
  • ChunkLoadError: Loading chunk
  • Module not found: Can't resolve 'glass-web-components/loader'
  1. Developer Guide

Common Errors and Their Solutions

Permission denied when running npm run dev

When running the command npm run dev, from within apps/rockmtn-platform, for example, you could encounter the following error:

sh: 1: next: Permission denied

Solutions

  • This error can be thrown when you have failed to run npm install or npm i to install package dependencies. Be sure you have completed the entire One-time Initial Setup Procedure documented in <project-root>/readme.md

ChunkLoadError: Loading chunk

Delete the .next folder, relaunch your project (e.g. npm run dev), and force-refresh your web page (SHIFT+ F5 / CMD + SHIFT+ R) to remove the cache.

Module not found: Can't resolve 'glass-web-components/loader'

Example:

./pages/_app.js:11:0
Module not found: Can't resolve 'glass-web-components/loader'
   9 | // VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
  10 | // Enable use of Glass Web Components 1 of 2
> 11 | import {
  12 |     applyPolyfills,
  13 |     defineCustomElements,
  14 | } from 'glass-web-components/loader';

Import trace for requested module:

https://nextjs.org/docs/messages/module-not-found

This can happen after making a configuration change and failing to rebuild. Try running the command:

$ rush rebuild
PreviousVS Code and the MongoDB PlaygroundNextDeveloping Glass Web Components

Last updated 3 years ago