ionic-team / stencil-component-starter

Minimal starter project for building shareable web components with Stencil
https://github.com/ionic-team/stencil
MIT License
278 stars 129 forks source link

Cannot build freshly created project on Windows 7 #47

Closed franktopel closed 6 years ago

franktopel commented 6 years ago

Stencil version:

npm list @stencil/core

I'm submitting a ... (check one with "x") [X ] bug report

Current behavior: C:\Users\XXXXXXX\test>npm run dev

my-component@0.0.1 dev C:\Users\XXXXXXX\test sd concurrent "stencil build --dev --watch" "stencil-dev-server"

[06:47.6] @stencil/core v0.7.7 [06:47.6] build, mycomponent, dev mode, started ... [06:47.6] compile started ... [06:47.6] compile finished in less than 1 ms [06:47.6] module map started ... [06:47.7] module map finished in 47 ms [06:47.7] generate bundles started ... [06:47.7] generate bundles finished in less than 1 ms [06:47.7] generate app files started ... [06:47.7] generate app files started ... [06:47.7] generate app files finished in 16 ms [06:47.7] generate app files finished in 16 ms

[ ERROR ] package.json error package.json "types" file does not exist: C:\Users\XXXXXXXX\test\dist\types\index.d.ts

[06:47.7] build failed, watching for changes... in 125 ms

Expected behavior: Start the dev server with no errors.

Steps to reproduce:

git clone https://github.com/ionic-team/stencil-component-starter.git test
cd test
npm run dev

Other information: Windows 7 Professional 64 Bit, V 6.1.7601 SP 1 Build 7601 node v8.11.1 npm 5.6.0

franktopel commented 6 years ago

It seems the reason for this is this line in package.json:

"types": "dist/types/index.d.ts",

After removing that property completely I got

[ ERROR ]  package.json error
           package.json "types" property is required when generating a
           distribution. Recommended entry d.ts file is:
           dist/types/components.d.ts

So I changed types in package.json to

"types": "dist/types/components.d.ts",

as recommended and now I can start the dev server with no error.

Will suggest that change for the repo package.json and create a PR.

jgw96 commented 6 years ago

Thanks! Feel free to ping me when the PR is ready and ill merge.

franktopel commented 6 years ago

Ping :+1:

jgw96 commented 6 years ago

Thanks for the PR! Just merged it.