Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

390
Visualizações
Uncaught ReferenceError when deploying to Netlify

I have published a git repo (https://github.com/GeorgeFlorian/Forkify-App) to Netlify (https://forkify-jorje.netlify.app/) after following an Udemy tutorial:

Everything works locally, but when I deploy it I get

Uncaught ReferenceError: Fraction is not defined
    at View.js:96

Fraction is not even inside View.js module: https://github.com/GeorgeFlorian/Forkify-App/blob/main/src/js/views/View.js

It is inside another one: https://github.com/GeorgeFlorian/Forkify-App/blob/main/src/js/views/recipeView.js

I don't know how to recreate this bug. All I did was follow the tutorial. The tutor's deployment worked, mine did not.
This is package.json:

{
  "name": "forkify-app",
  "version": "1.0.0",
  "description": "",
  "default": "index.html",
  "scripts": {
    "start": "parcel index.html --open",
    "build": "parcel build index.html --dist-dir ./dist"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/GeorgeFlorian/Forkify-App.git"
  },
  "author": "",
  "license": "ISC",
  "bugs": {
    "url": "https://github.com/GeorgeFlorian/Forkify-App/issues"
  },
  "homepage": "https://github.com/GeorgeFlorian/Forkify-App#readme",
  "devDependencies": {
    "@parcel/transformer-sass": "^2.0.1",
    "parcel": "^2.0.1"
  },
  "dependencies": {
    "core-js": "^3.19.2",
    "fractional": "^1.0.0",
    "regenerator-runtime": "^0.13.9"
  }
}

I can't find anything relevant online and that's why I've posted here.

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

I got the same error, did the same JS Udemy course by Jonas lol. I found out the problem has to do something with parcel hoisting. Insert --no-scope-hoist in front of the build command like this & try

parcel build index.html --no-scope-hoist
about 4 years ago · Juan Pablo Isaza Relatório

0

Use a different package Fracty instead of Fractional

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda