Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local development issues #9

Open
maxatdetroit opened this issue Mar 12, 2024 · 0 comments
Open

Local development issues #9

maxatdetroit opened this issue Mar 12, 2024 · 0 comments
Assignees
Labels
dependencies Pull requests that update a dependency file

Comments

@maxatdetroit
Copy link
Member

While working on CityOfDetroit/detroitmi#1354, I began looking into how calendar is implemented on intranet.detroitmi.gov and found that this repo is used for the calendar. To better understand this repo, I attempted to contribute by downloading and running the code locally. The following issues occurred:

Parcel command does not exist

The parcel binary does not exist.

Solution: Install parcel as part of the dev dependencies for the project: npm install --save-dev parcel.

Parcel 2 expects classic scripts to be labeled as modules if they contain ES imports

🚨 Build failed.

@parcel/transformer-js: Browser scripts cannot have imports or exports.

  /home/max/Projects/drupal-calendar/index.js:2:1
    1 | 'use strict';
  > 2 | import { Calendar } from '@fullcalendar/core';
  >   | ^
    3 | import '@fullcalendar/core/main.css';
    4 | import Controller from './controller.class';

  /home/max/Projects/drupal-calendar/index.html:46:3
    45 | </section>
  > 46 |   <script src="index.js"></script>
  >    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The environment was originally created here
    47 | </body>
    48 |

  💡 Add the type="module" attribute to the <script> tag.
  📝 Learn more: https://parceljs.org/languages/javascript/#classic-scripts

Solution: Add the type="module" attribute to the <script> tag.

Committed build caches cause issues for build on a new machine

🚨 Build failed.

Error: Expected content key de1e4a02ec63c4eb to exist

  Error: Expected content key de1e4a02ec63c4eb to exist
      at nullthrows (/home/max/Projects/drupal-calendar/node_modules/nullthrows/nullthrows.js:7:15)
      at AssetGraph.getNodeIdByContentKey (/home/max/Projects/drupal-calendar/node_modules/@parcel/graph/lib/ContentGraph.js:67:38)
      at /home/max/Projects/drupal-calendar/node_modules/@parcel/core/lib/SymbolPropagation.js:52:82
      at Array.map (<anonymous>)
      at propagateSymbols (/home/max/Projects/drupal-calendar/node_modules/@parcel/core/lib/SymbolPropagation.js:52:61)
      at AssetGraphBuilder.build
  (/home/max/Projects/drupal-calendar/node_modules/@parcel/core/lib/requests/AssetGraphRequest.js:174:62)
      at async Object.run (/home/max/Projects/drupal-calendar/node_modules/@parcel/core/lib/requests/AssetGraphRequest.js:62:37)
      at async RequestTracker.runRequest (/home/max/Projects/drupal-calendar/node_modules/@parcel/core/lib/RequestTracker.js:673:20)
      at async Object.run (/home/max/Projects/drupal-calendar/node_modules/@parcel/core/lib/requests/BundleGraphRequest.js:106:11)
      at async RequestTracker.runRequest (/home/max/Projects/drupal-calendar/node_modules/@parcel/core/lib/RequestTracker.js:673:20)

Solution: Remove the .cache and .parcel-cache folders and prevent them from being committed to git.

@maxatdetroit maxatdetroit added the dependencies Pull requests that update a dependency file label Mar 12, 2024
@maxatdetroit maxatdetroit self-assigned this Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

1 participant