fabiospampinato / TRAM

Boilerplate for building reactive isomorphic applications. Built around TypeScript, React, Apollo, MongoDB.
MIT License
6 stars 1 forks source link

Error on build:vendor #1

Open theodorDiaconu opened 6 years ago

theodorDiaconu commented 6 years ago

Was looking for ways to architect apollo, graphql, and typescript, your boilerplate is full of very nice ideas and concepts!

$ npm run build:vendor

> @fabiospampinato/tram@1.0.3 build:vendor /Users/theodor/Projects/TRAM
> npm-run-all -p build:client:vendor build:server:vendor

> @fabiospampinato/tram@1.0.3 build:client:vendor /Users/theodor/Projects/TRAM
> webpack --config webpack/client/vendor.ts

> @fabiospampinato/tram@1.0.3 build:server:vendor /Users/theodor/Projects/TRAM
> webpack --config webpack/server/vendor.ts

/Users/theodor/Projects/TRAM/node_modules/ts-node/src/index.ts:307
        throw new TSError(formatDiagnostics(diagnosticList, cwd, ts, lineOffset))
              ^
TSError: ⨯ Unable to compile TypeScript
webpack/client/vendor.ts (9,1): Type 'true' is not assignable to type 'string | undefined'. (2322)
    at getOutput (/Users/theodor/Projects/TRAM/node_modules/ts-node/src/index.ts:307:15)
    at /Users/theodor/Projects/TRAM/node_modules/ts-node/src/index.ts:336:16
    at Object.compile (/Users/theodor/Projects/TRAM/node_modules/ts-node/src/index.ts:498:11)
    at Module.m._compile (/Users/theodor/Projects/TRAM/node_modules/ts-node/src/index.ts:392:43)
    at Module._extensions..js (module.js:673:10)
    at Object.require.extensions.(anonymous function) [as .ts] (/Users/theodor/Projects/TRAM/node_modules/ts-node/src/index.ts:395:12)
    at Module.load (module.js:575:32)
    at tryModuleLoad (module.js:515:12)
    at Function.Module._load (module.js:507:3)
    at Module.require (module.js:606:17)
fabiospampinato commented 6 years ago

It looks like TypeScript has found a type error in webpack/client/vendor.ts, actually this line:

https://github.com/fabiospampinato/TRAM/blob/07f681784a290c872cfd90964c91b58fefb76cdc/webpack/client/vendor.ts#L9

Should be:

process.env.CLIENT = 'true';

I currently don't have time to work on this, so I can't provide you updates any time soon.

theodorDiaconu commented 6 years ago

@fabiospampinato sure no problem, thanks for the response!