npm run build error
vwxyzjn opened this issue · comments
Hi, I was trying to see if I can build notablog by running npm run build
or npm run dev
, but here is the error I have
(base) [costa@costa-pc notablog]$ npm run build
> notablog@0.4.0 build /home/costa/Documents/work/go/src/github.com/111/notablog
> npm run build:module && npm run build:doc
> notablog@0.4.0 build:module /home/costa/Documents/work/go/src/github.com/111/notablog
> rm -rf dist && rollup -c && tsc --emitDeclarationOnly
src/index.ts → dist/index.js, dist/index.esm.js...
[!] Error: 'getConfig' is not exported by src/util.ts, imported by src/generate.ts
https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module
src/generate.ts (10:14)
8: import { renderIndex } from './render-index'
9: import { renderPost } from './render-post'
10: import { log, getConfig } from './util'
^
11:
12: type GenerateOptions = {
Error: 'getConfig' is not exported by src/util.ts, imported by src/generate.ts
at error (/home/costa/Documents/work/go/src/github.com/111/notablog/node_modules/rollup/dist/shared/rollup.js:10120:30)
at Module.error (/home/costa/Documents/work/go/src/github.com/111/notablog/node_modules/rollup/dist/shared/rollup.js:14470:16)
at handleMissingExport (/home/costa/Documents/work/go/src/github.com/111/notablog/node_modules/rollup/dist/shared/rollup.js:14371:28)
at Module.traceVariable (/home/costa/Documents/work/go/src/github.com/111/notablog/node_modules/rollup/dist/shared/rollup.js:14835:24)
at ModuleScope.findVariable (/home/costa/Documents/work/go/src/github.com/111/notablog/node_modules/rollup/dist/shared/rollup.js:13415:39)
at FunctionScope.findVariable (/home/costa/Documents/work/go/src/github.com/111/notablog/node_modules/rollup/dist/shared/rollup.js:8664:38)
at ChildScope.findVariable (/home/costa/Documents/work/go/src/github.com/111/notablog/node_modules/rollup/dist/shared/rollup.js:8664:38)
at Identifier$1.bind (/home/costa/Documents/work/go/src/github.com/111/notablog/node_modules/rollup/dist/shared/rollup.js:9123:40)
at CallExpression$1.bind (/home/costa/Documents/work/go/src/github.com/111/notablog/node_modules/rollup/dist/shared/rollup.js:8749:23)
at CallExpression$1.bind (/home/costa/Documents/work/go/src/github.com/111/notablog/node_modules/rollup/dist/shared/rollup.js:11440:15)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! notablog@0.4.0 build:module: `rm -rf dist && rollup -c && tsc --emitDeclarationOnly`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the notablog@0.4.0 build:module script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/costa/.npm/_logs/2020-03-27T18_13_16_407Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! notablog@0.4.0 build: `npm run build:module && npm run build:doc`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the notablog@0.4.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/costa/.npm/_logs/2020-03-27T18_13_16_417Z-debug.log
I was wondering If you could offer some insights. Would love to contribute.
Sorry for the inconvenience!
The repository is quite messy now, because I started migrating from JavaScript to TypeScript recently and wanted to refactor lots of stuff, also there is some code that I haven't pushed, so it's hard to say how to fix it.
If you would like to see how the application works, I suggest that you switch back to the commit tagged v0.4.0, which is the latest released version and where everything is still in JavaScript, so no build process is needed.
That works. Thanks