Closed justinwaite closed 6 years ago
Thanks!
I added aws-lambda
as a dev dependency under sls-random
because it's only there for type checking. Did you run yarn install
prior to yarn build
? Without the --production
flag?
Of course! I smashed my face against a wall trying to get something like this going before I found your repo!
As for the steps I took -- simply clone the repo, cd
into it, run yarn install
and then run yarn build
and I receive those errors.
Looking into this further, the error occurs because of the sls-random
package, as you said, depends on aws-lambda
. I believe the nohoist
option causes the aws-lambda
package to not get installed on the root node_modules
, although it IS installed on the sls-random
node_modules
. Maybe that is the cause? For some reason it is not looking in the child node_modules
folders when building in the root? Not sure...
As for the first error:
node_modules/@types/node/index.d.ts:34:22 - error TS6305: Output file '/Users/justin/WebstormProjects/trashme/packages/typesnode_modules/@types/node/inspector.d.ts' has not been built from source file '/Users/justin/WebstormProjects/trashme/node_modules/@types/node/inspector.d.ts'.
34 /// <reference path="./inspector.d.ts" />
Any idea what that would be?
@jdeanwaite not exactly sure but I suspect there is an issue related to path mapping and/or inclusion/exclusion of input files
reason is that your error contains an invalid path serverless-mono-example/packages/typesnode_modules
where obviously it should be types/node_modules
. There is a missing /
.
Are you sure that node_modules
is being excluded?
I can now reproduce this issue. Not sure when it started appearing..
Not sure about a fix yet either. Will give it a try.
@jdeanwaite problem is that the root tsconfig.json
should not have a reference to types
, because types is not supposed to be build. It only contains type definitions for compilation reasons used by typeRoots
However when removing it I'm seeing strange behavior where output files are not written to their outDirs. Will investigate further
Nice. Will check out the commit and massage it into my project.
First off, just want to say this is a great starter project, and perfect timing! It seems every time I start researching a new stack/paradigm someone just released something 4 days prior!
Just a quick issue while testing out the repo: when I run
yarn build
from the root dir per the README documentation, I receive the following Typescript errors:However, building from within the individual packages appears to work just fine.