question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ERROR: Javascript files have not been built.

See original GitHub issue

Trying to set up a new ghost blog on a fresh install of Ubuntu 14.04 I get the following output when running npm start --production:

> ghost@0.5.3 start /opt/fupt
> node index


ERROR: Javascript files have not been built.

Please read the getting started instructions at:
https://github.com/TryGhost/Ghost#getting-started-guide-for-developers
 Error: Javascript files have not been built.
    at /opt/fupt/core/server/index.js:83:31
    at Object.cb [as oncomplete] (fs.js:168:19)

Before running that I ran npm install --production and got the following output:

npm WARN engine html-to-text@0.1.0: wanted: {"node":"~0.8.0"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm ERR! fetch failed https://registry.npmjs.org/debug/-/debug-2.0.0.tgz
npm ERR! registry error parsing json
npm ERR! fetch failed https://registry.npmjs.org/commander/-/commander-2.5.0.tgz
npm ERR! fetch failed https://registry.npmjs.org/liftoff/-/liftoff-0.11.3.tgz
npm WARN deprecated set-immediate@0.1.1: Use `setimmediate` instead

> sqlite3@2.2.7 install /opt/fupt/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build

[sqlite3] Success: "/opt/fupt/node_modules/sqlite3/lib/binding/node-v11-linux-x64/node_sqlite3.node" is installed via remote
connect-slashes@1.2.0 node_modules/connect-slashes

colors@0.6.2 node_modules/colors

xml@0.0.12 node_modules/xml

node-uuid@1.4.1 node_modules/node-uuid

validator@3.4.0 node_modules/validator

passport-http-bearer@1.0.1 node_modules/passport-http-bearer
└── passport-strategy@1.0.0

showdown@0.3.2-ghost node_modules/showdown

passport@0.2.0 node_modules/passport
β”œβ”€β”€ pause@0.0.1
└── passport-strategy@1.0.0

semver@2.2.1 node_modules/semver

bcryptjs@0.7.10 node_modules/bcryptjs

morgan@1.3.1 node_modules/morgan
β”œβ”€β”€ basic-auth@1.0.0
β”œβ”€β”€ depd@0.4.5
└── on-finished@2.1.0 (ee-first@1.0.5)

fs-extra@0.8.1 node_modules/fs-extra
β”œβ”€β”€ jsonfile@1.1.1
β”œβ”€β”€ rimraf@2.2.8
β”œβ”€β”€ ncp@0.4.2
└── mkdirp@0.3.5

passport-oauth2-client-password@0.1.1 node_modules/passport-oauth2-client-password
β”œβ”€β”€ pkginfo@0.2.3
└── passport@0.1.18 (pause@0.0.1)

oauth2orize@1.0.1 node_modules/oauth2orize
β”œβ”€β”€ uid2@0.0.3
β”œβ”€β”€ utils-merge@1.0.0
└── debug@0.7.4

downsize@0.0.5 node_modules/downsize
└── xregexp@2.0.0

rss@0.2.1 node_modules/rss
└── mime@1.2.11

body-parser@1.8.2 node_modules/body-parser
β”œβ”€β”€ bytes@1.0.0
β”œβ”€β”€ media-typer@0.3.0
β”œβ”€β”€ raw-body@1.3.0
β”œβ”€β”€ qs@2.2.3
β”œβ”€β”€ depd@0.4.5
β”œβ”€β”€ on-finished@2.1.0 (ee-first@1.0.5)
β”œβ”€β”€ type-is@1.5.2 (mime-types@2.0.2)
└── iconv-lite@0.4.4

bluebird@2.3.0 node_modules/bluebird

html-to-text@0.1.0 node_modules/html-to-text
β”œβ”€β”€ underscore@1.7.0
β”œβ”€β”€ htmlparser@1.7.7
β”œβ”€β”€ optimist@0.6.1 (wordwrap@0.0.2, minimist@0.0.10)
└── underscore.string@2.3.3

lodash@2.4.1 node_modules/lodash

unidecode@0.1.3 node_modules/unidecode

busboy@0.2.8 node_modules/busboy
β”œβ”€β”€ readable-stream@1.1.13 (isarray@0.0.1, inherits@2.0.1, string_decoder@0.10.31, core-util-is@1.0.1)
└── dicer@0.2.3 (streamsearch@0.1.2)

bookshelf@0.7.6 node_modules/bookshelf
β”œβ”€β”€ inherits@2.0.1
β”œβ”€β”€ trigger-then@0.3.0
β”œβ”€β”€ simple-extend@0.1.0
β”œβ”€β”€ create-error@0.3.1
β”œβ”€β”€ inflection@1.3.8
β”œβ”€β”€ semver@2.3.2
β”œβ”€β”€ backbone@1.1.0 (underscore@1.7.0)
└── bluebird@2.0.7

express@4.9.2 node_modules/express
β”œβ”€β”€ utils-merge@1.0.0
β”œβ”€β”€ merge-descriptors@0.0.2
β”œβ”€β”€ fresh@0.2.4
β”œβ”€β”€ cookie@0.1.2
β”œβ”€β”€ escape-html@1.0.1
β”œβ”€β”€ range-parser@1.0.2
β”œβ”€β”€ cookie-signature@1.0.5
β”œβ”€β”€ vary@1.0.0
β”œβ”€β”€ media-typer@0.3.0
β”œβ”€β”€ finalhandler@0.2.0
β”œβ”€β”€ methods@1.1.0
β”œβ”€β”€ parseurl@1.3.0
β”œβ”€β”€ path-to-regexp@0.1.3
β”œβ”€β”€ depd@0.4.5
β”œβ”€β”€ qs@2.2.3
β”œβ”€β”€ on-finished@2.1.1 (ee-first@1.1.0)
β”œβ”€β”€ etag@1.3.1 (crc@3.0.0)
β”œβ”€β”€ proxy-addr@1.0.1 (ipaddr.js@0.1.2)
β”œβ”€β”€ debug@2.0.0 (ms@0.6.2)
β”œβ”€β”€ send@0.9.2 (destroy@1.0.3, ms@0.6.2, on-finished@2.1.0, mime@1.2.11)
β”œβ”€β”€ type-is@1.5.2 (mime-types@2.0.2)
β”œβ”€β”€ serve-static@1.6.4 (send@0.9.3)
└── accepts@1.1.2 (negotiator@0.4.9, mime-types@2.0.2)

moment@2.4.0 node_modules/moment

compression@1.1.0 node_modules/compression
β”œβ”€β”€ bytes@1.0.0
β”œβ”€β”€ on-headers@1.0.0
β”œβ”€β”€ vary@1.0.0
β”œβ”€β”€ debug@2.0.0 (ms@0.6.2)
β”œβ”€β”€ compressible@2.0.1 (mime-db@1.1.2)
└── accepts@1.1.2 (negotiator@0.4.9, mime-types@2.0.2)

express-hbs@0.7.11 node_modules/express-hbs
β”œβ”€β”€ readdirp@0.3.3 (graceful-fs@2.0.3, minimatch@0.2.14)
β”œβ”€β”€ js-beautify@1.4.2 (mkdirp@0.3.5, nopt@2.1.2, config-chain@1.1.8)
└── handlebars@2.0.0 (optimist@0.3.7, uglify-js@2.3.6)

cheerio@0.17.0 node_modules/cheerio
β”œβ”€β”€ entities@1.1.1
β”œβ”€β”€ dom-serializer@0.0.1 (domelementtype@1.1.3)
β”œβ”€β”€ htmlparser2@3.7.3 (domelementtype@1.1.3, domutils@1.5.0, entities@1.0.0, domhandler@2.2.1, readable-stream@1.1.13)
└── CSSselect@0.4.1 (domutils@1.4.3, CSSwhat@0.4.7)

nodemailer@0.7.1 node_modules/nodemailer
β”œβ”€β”€ public-address@0.1.1
β”œβ”€β”€ directmail@0.1.8
β”œβ”€β”€ he@0.3.6
β”œβ”€β”€ readable-stream@1.1.13 (isarray@0.0.1, inherits@2.0.1, string_decoder@0.10.31, core-util-is@1.0.1)
β”œβ”€β”€ simplesmtp@0.3.33 (xoauth2@0.1.8, rai@0.1.11)
β”œβ”€β”€ mailcomposer@0.2.12 (mime@1.2.11, follow-redirects@0.0.3, dkim-signer@0.1.2, mimelib@0.2.18)
└── aws-sdk@2.0.5 (xmlbuilder@0.4.2, xml2js@0.2.6, aws-sdk-apis@3.1.10)

mysql@2.1.1 node_modules/mysql
β”œβ”€β”€ require-all@0.0.3
β”œβ”€β”€ readable-stream@1.1.13 (isarray@0.0.1, inherits@2.0.1, string_decoder@0.10.31, core-util-is@1.0.1)
└── bignumber.js@1.0.1

sqlite3@2.2.7 node_modules/sqlite3
β”œβ”€β”€ set-immediate@0.1.1
└── nan@1.1.2

knex@0.6.21 node_modules/knex
β”œβ”€β”€ tildify@0.2.0
β”œβ”€β”€ inherits@2.0.1
β”œβ”€β”€ interpret@0.3.7
β”œβ”€β”€ commander@2.5.0
β”œβ”€β”€ generic-pool-redux@0.1.0
β”œβ”€β”€ minimist@0.0.10
β”œβ”€β”€ chalk@0.4.0 (has-color@0.1.7, ansi-styles@1.0.0, strip-ansi@0.1.1)
β”œβ”€β”€ semver@2.3.2
β”œβ”€β”€ readable-stream@1.1.13 (isarray@0.0.1, string_decoder@0.10.31, core-util-is@1.0.1)
β”œβ”€β”€ mkdirp@0.5.0 (minimist@0.0.8)
β”œβ”€β”€ bluebird@1.2.4
└── liftoff@0.11.3 (extend@1.2.1, minimist@0.1.0, resolve@0.7.4, findup-sync@0.1.3)

Do I need to downgrade Node and NPM? I have installed Node from ppa:chris-lea/node.js

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ErisDScommented, Aug 20, 2015

The original issue here is a common mistake people encounter when trying to build Ghost. In order to build the files for development mode you need to run grunt init. If you want to also build the files for production mode, you must also run grunt prod after running grunt init.

However, the more recent comments relate to a regression, which has happened since the last release. I have raised that as a separate issue here: #5695

1reaction
ghostcommented, Aug 13, 2015

I debug command node start --production. Check function file core/server/index.index line 104, add code console.log(location + fileName); and try again run node start --producction, i see log

/Users/giangnguyen/Public/ghost/core/built/assets/ghost.min.js /Users/giangnguyen/Public/ghost/core/built/assets/vendor.min.js /Users/giangnguyen/Public/ghost/core/built/assets/ghost.min.css /Users/giangnguyen/Public/ghost/core/built/assets/vendor.min.css```

notied file

ghost.min.css, i does’t exit when you run grunt prod, it out put ghost.css, when you run grunt prod and rename ghost.css to ghost.min.css, it works for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

JavaScript file missing when buildling - firebase - Stack Overflow
I'm using Vite as a frontend build tool. The code above works locally, but when it builds, it does NOT produce JS file...
Read more >
How to Fix the Issue When Page Has Broken Javascript
Here is a tip on fixing a 404 issue: Try restoring the JS file and then editing the link on the page to...
Read more >
I keep getting TS linting issues when working on plain JS file ...
Steps to Reproduce: open JS file; See import files. I keep getting TS linting issues when working on plain JS file. no extensions...
Read more >
js file not being created - Builder - PsychoPy Discourse
I looked in my local folder, and while the PsychoPy file is there, there is no js file. I have tried to compile...
Read more >
Error - JavaScript - MDN Web Docs - Mozilla
Runtime errors result in new Error objects being created and thrown. Error is a serializable object, so it can be cloned with structuredClone()Β ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found