stencil-community / stencil-app-starter

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

Quick guide for current setup on windows 10 #72

Closed RienNeVaPlus closed 2 years ago

RienNeVaPlus commented 5 years ago

The setup on windows 10 is currently a little fuzzy, so I thought I leave a short guide on what did it for me.

  1. Install using npm init stencil app
  2. Switch into the new directory but don't run npm start as suggested by the output yet, instead do an npm install (otherwise it will fail with "Error: baseUrl "https://myapp.local/" must start with a slash "/".")
  3. Open /src/global/app.ts and add the following (otherwise it will fail with "The code to be executed should be placed within a default function that is exported by the global script. Ensure all of the code in the global script is wrapped in the function() that is exported."):
    export default function(){
    console.log('An empty file should propably be valid as well');
    }

npm start will not work until 2 & 3 are completed.

simonhaenisch commented 5 years ago

Third point should be fixed by 000f5ffc29805e2d4f4a523731015bc0a6dc1e58. Don't know what's up with the second one.

rwaskiewicz commented 2 years ago

👋 I'm going to close this issue, as I believe the second point has been fixed in the create-stencil project (we explicitly state one must cd to the directory and run npm install now). Thanks again!