GithubHelp home page GithubHelp logo

ionic-team / create-stencil Goto Github PK

View Code? Open in Web Editor NEW
49.0 10.0 28.0 2.19 MB

npm init stencil

Home Page: https://stenciljs.com/

License: MIT License

JavaScript 1.83% TypeScript 98.17%
stenciljs stencil ionic pwa web-components

create-stencil's Introduction

The create-stencil CLI

create-stencil is a CLI for creating new Stencil projects based on predefined templates, or "starters". It is the official CLI maintained by the Stencil team, and is recommended for all new projects.

Prerequisites

The create-stencil CLI requires npm version 6 or higher to be installed. For instructions for installing or upgrading npm, please see the npm Documentation.

Starters

The create-stencil CLI offers the following starters for bootstrapping your project:

  • component - allows one to spin up a component library containing one or more Stencil components. Best suited for teams/individuals looking to reuse components across one or more applications. (Source Code)
  • app - allows one to spin up an application, complete with routing. This is a community-driven project, and is not formally owned by the Stencil team. (Source Code)
  • ionic-pwa - allows one to spin up an Ionic PWA, complete with tabs layout and routing. This is a community-driven project, and is not formally owned by the Stencil team. (Source Code)

The CLI can also generate projects using starters that are not officially developed by Ionic or the Stencil Community. See the documentation for Command Mode for additional information on using additional templates.

Usage

The create-stencil CLI can be run in one of two modes - Interactive Mode or Command Mode.

Interactive Mode

Interactive Mode allows a user to interactively select options for creating a new Stencil project. create-stencil can be started in Interactive Mode by running:

$ npm init stencil

Running the CLI in Interactive Mode will prompt you to select one of the available starters to use:

$ npm init stencil

✔ Select a starter project.

Starters marked as [community] are developed by the Stencil Community,
rather than Ionic. For more information on the Stencil Community, please see
https://github.com/stencil-community › - Use arrow-keys. Return to submit.component                Collection of web components that can be used anywhere
    app [community]          Minimal starter for building a Stencil app or website
    ionic-pwa [community]    Ionic PWA starter with tabs layout and routes

Followed by a name for your new project:

✔ Project name > my-stencil-library

After confirming your selections, your project will be created. In this example, a new component library starter will have been copied into a newly created my-stencil-library directory:

✔ Confirm? … yes
✔ All setup  in 29 ms

  We suggest that you begin by typing:

  $ cd my-stencil-library
  $ npm install
  $ npm start

  You may find the following commands will be helpful:

  $ npm start
    Starts the development server.

  $ npm run build
    Builds your project in production mode.

  $ npm test
    Starts the test runner.


  Further reading:

   - https://github.com/ionic-team/stencil-component-starter
   - https://stenciljs.com/docs

  Happy coding! 🎈

Command Mode

Command Mode allows you to create a new Stencil project by specifying all project options upfront.

To run the CLI in Command Mode, a starter and project name must be specified:

npm init stencil [starter] [project-name]

An example of creating a component starter with the name "my-stencil-library" is shown below:

npm init stencil component my-stencil-library

In the example above, a new component library starter will have been created in a newly created my-stencil-library directory.

Custom Templates

In addition to the provided template options, users may choose to use one of their own custom templates hosted on GitHub.com.

To use a custom starter template, provide the GitHub repository owner and repository name as the starter name, using the format REPO_OWNER/REPO_NAME. For example, to retrieve a template that is owned by 'my-organization' that has the name 'my-stencil-template':

npm init stencil my-organization/my-stencil-template my-stencil-library

The command above will create a copy of the my-organization/my-stencil-template repository, and place it under my-stencil-library on disk.

This can be used in conjunction with Self Hosted GitHub Instances to use custom starter templates that live on a self-hosted GitHub instance.

Additional Flags

Note: When passing flags to the create-stencil CLI, a double dash ('--') must be placed between npm init stencil and the flag(s) passed to the CLI:

$ npm init stencil -- --help

--help, -h

The --help flag shows usage examples for the CLI.

--info

The --info will print the current version of the CLI.

Environment Variables

https_proxy

If you are behind a proxy, the https_proxy environment variable can be set when running the CLI:

$ https_proxy=https://[IP_ADDRESS] npm init stencil

Stencil uses https-proxy-agent under the hood to connect to the specified proxy server. The value provided for https_proxy will be passed directly to the constructor for a new HttpsProxyAgent instance.

stencil_self_hosted_url

In some scenarios, teams may find themselves working solely out of a self-hosted GitHub instance.

Users wishing to point the create-stencil CLI at a GitHub instance other than GitHub have two options:

  1. Set stencil_self_hosted_url in your .npmrc file, like so:

    // .npmrc
    stencil_self_hosted_url=https://your_self_hosted_github_repo.com/
    

    Using this option, the CLI can be called as such, automatically picking up the value in stencil_self_hosted_url:

    npm init stencil [starter] [project-name]
    
  2. Set stencil_self_hosted_url at invocation time:

    stencil_self_hosted_url=https://your_self_hosted_github_repo.com/ npm init stencil

    When using this option, stencil_self_hosted_url must always be set every time the CLI is called.

When both options are set, the value provided on the command line takes precedence over the value in your .npmrc file.

Citations

Original project was created by William M. Riley:

Related Links

create-stencil's People

Contributors

adamdbradley avatar aveiga avatar beenotung avatar christian-bromann avatar dependabot[bot] avatar erickit avatar ghingis avatar jcesarmobile avatar jthoms1 avatar kplhub avatar manucorporat avatar peterennis avatar pwespi avatar renovate[bot] avatar rwaskiewicz avatar sean-perkins avatar splitinfinities avatar tanner-reits avatar willmartian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

create-stencil's Issues

bug: command failed command sh -c create-stencil

Prerequisites

Create Stencil Version

@latest

Current Behavior

When I run npm init stencil or npm init stencil@latest the Perparing starter process fails with

Protocol "https:" not supported. Expected "http:"

command failed
command sh -c create-stencil

Expected Behavior

The stencil project should be initialized

Steps to Reproduce

run npm init stencil or npm init stencil@latest

Additional Information

I have http-proxy and https-proxy setup for my company proxy and I have tried with the registry config set to with both the http and https.

Works fine from my personal computer.

npm init stencil is broken

Steps to reproduce

  1. run npm init stencil
  2. choose any of the options

I get

(node:3996) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:80
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1137:16)
(node:3996) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:3996) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Can reproduce with the local repository and works if I checkout 1.8.2 tag

ReferenceError: beep is not defined

When I ran npm init stencil and pressed , I got this error.

? Pick a starter » - Use arrow-keys. Return to submit.

>  ionic-pwa     Everything you need to build fast, production ready PWAs
   app           Minimal starter for building a Stencil app or website
   component     Collection of web components that can be used anywherereadline.js:1032
            throw err;
            ^

ReferenceError: beep is not defined
    at SelectPrompt.bell (C:\Users\<username>\AppData\Roaming\npm-cache\_npx\1412\node_modules\create-stencil\dist\index.js:2:30265)
    at SelectPrompt.up (C:\Users\<username>\AppData\Roaming\npm-cache\_npx\1412\node_modules\create-stencil\dist\index.js:2:31832)
    at ReadStream.n (C:\Users\<username>\AppData\Roaming\npm-cache\_npx\1412\node_modules\create-stencil\dist\index.js:2:29953)
    at ReadStream.emit (events.js:182:13)
    at emitKeys (internal/readline.js:422:14)
    at emitKeys.next (<anonymous>)
    at ReadStream.onData (readline.js:1022:36)
    at ReadStream.emit (events.js:187:15)
    at addChunk (_stream_readable.js:283:12)
    at readableAddChunk (_stream_readable.js:264:11)

These lines seem to cause this error.

bell() {
this.out.write(beep);
}

OS: Windows10
Node.js: v10.8.0
npm: 6.2.0

Rename components starter to component

To me, it feels strange to use:

npm init stencil components my-component

When I just want to make a single web-component, not multiple (plural)

Even, the starter repository is stencil-component-starter

WDYT?

Does not generate docs

Hi,

I tried running npm init stencil and it appears to be working, however when I try to generate docs (having made no mods):

$ npm run build
[08:55.2]  @stencil/core v1.0.0-beta.8 🌻

[ WARN  ]  This is a prerelease build, undocumented changes might happen at any time. Technical support is not
           available for prereleases, but any assistance testing is appreciated.

[08:55.2]  build, fragments, prod mode, started ...
[08:55.3]  transpile started ...
[08:55.3]  transpile finished in 5 ms
[08:55.3]  type checking started ...
[08:55.3]  generate styles started ...
[08:55.4]  bundling components started ...
[08:55.4]  generate styles finished in 86 ms
[08:56.8]  bundling components finished in 1.42 s
[08:58.4]  type checking finished in 3.04 s
[08:58.4]  build finished in 3.13 s

Although I see it has created a dist/ folder, I don't see any docs generated anywhere? Thanks

bug: npm init stencil not working

Prerequisites

Stencil Version

latest

Current Behavior

When I do npm init stencil I get this :
node version v16.13.0
npm version 8.1.0

✖ Protocol "https:" not supported. Expected "http:"
image

I tried with node 17.5.0 and 16.14.0 and I get this error :
image

I am using nvm, not sure if that has to do with anything

Expected Behavior

being able to create a starter app

Steps to Reproduce

npm init stencil on windows

Code Reproduction URL

https://github.com/ionic-team/stencil/

Additional Information

I can't reproduce it in a code reproduction url...it's via cmd

Support non-alphanumeric characters in project name

Stencil version:

I'm submitting a:

[ ] bug report
[x] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/

Current behavior:
When installing Stencil, if you create a package name that contains non-alphanumeric characters, the install fails:

✖ Project name "@blah/my-project" is not valid. It must be a kebab-case name without spaces.

Expected behavior:
The project name should be able to support prefixes (such as @stencil/core) since this is a common convention.

Steps to reproduce:

Related code:

// insert any relevant code here

Other information:

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • chore(deps): update dependency @types/node to v20.12.7
  • chore(deps): update node.js to v20.12.2

Pending Status Checks

These updates await pending status checks. To force their creation now, click the checkbox below.

  • chore(deps): update dependency npm to v10.5.2
  • chore(deps): update dependency rollup to v4.14.2

Detected dependencies

github-actions
.github/workflows/actions/download-archive/action.yml
  • actions/download-artifact v4.1.4@c850b930e6ba138125429b7e5c93fc707a7f8427
.github/workflows/actions/get-core-dependencies/action.yml
  • actions/setup-node v4.0.2@60edb5dd545a775178f52524783378180af0d1f8
.github/workflows/actions/publish-npm/action.yml
  • actions/checkout v4.1.1@b4ffde65f46336ab88eb53be808477a3936bae11
.github/workflows/actions/upload-archive/action.yml
  • actions/upload-artifact v4.3.1@5d5d22a31266ced268874388b861e4b58bb5c2f3
.github/workflows/build.yml
  • actions/checkout v4.1.1@b4ffde65f46336ab88eb53be808477a3936bae11
.github/workflows/format.yml
  • actions/checkout v4.1.1@b4ffde65f46336ab88eb53be808477a3936bae11
.github/workflows/release-dev.yml
  • actions/checkout v4.1.1@b4ffde65f46336ab88eb53be808477a3936bae11
  • actions/checkout v4.1.1@b4ffde65f46336ab88eb53be808477a3936bae11
.github/workflows/test-component-starter.yml
  • actions/checkout v4.1.1@b4ffde65f46336ab88eb53be808477a3936bae11
  • actions/setup-node v4.0.2@60edb5dd545a775178f52524783378180af0d1f8
npm
package.json
  • prompts ^2.4.2
  • @ionic/prettier-config ^4.0.0
  • @rollup/plugin-commonjs ^25.0.0
  • @rollup/plugin-json ^6.0.0
  • @rollup/plugin-node-resolve ^15.0.0
  • @types/cli-spinner ^0.2.0
  • @types/jest ^29.0.0
  • @types/node ^20.1.7
  • @types/prompts ^2.0.14
  • @types/yauzl ^2.9.1
  • cli-spinner ^0.2.10
  • colorette ^2.0.20
  • https-proxy-agent ^7.0.0
  • jest ^29.0.0
  • np ^10.0.0
  • prettier 3.2.5
  • replace-in-file ^7.0.0
  • rollup ^4.0.0
  • sisteransi ^1.0.5
  • terser ^5.17.1
  • ts-jest ^29.0.0
  • typescript ~5.0.0
  • yauzl ^3.0.0
  • node >=10.10.0
  • npm >=6.0.0
  • node 20.12.1
  • npm 10.5.1

  • Check this box to trigger a request for Renovate to run again on this repository

bug: Fresh install, fresh project creation, dev server returns error: Failed to open a WebSocket connection: invalid Connection header: keep-alive.

Prerequisites

Create Stencil Version

4.9.0

Current Behavior

After fresh install, and fresh project creation

Server starts on localhost:3333

Chrome tab is opened and shows:

Failed to open a WebSocket connection: invalid Connection header: keep-alive.

You cannot access a WebSocket server directly with a browser. You need a WebSocket client.

Expected Behavior

I'd expect the browser to display the default generated web component

Steps to Reproduce

npm install -g create-stencil@latest

npm init stencil

choose component option

cd my-component

npm install

npm start

Additional Information

Windows 11
Node.js 20.1.0
npm 9.6.4

Wrong colors in Firefox in a freshly generated ionic-pwa app

Colors seems to be wrong when running an app generated with npm init stencil, and choosing ionic-pwa as the type. Starting the dev server with npm start and opening it on both Chrome and Firefox gives you this differences in colors.

imagen

(I don't really know if this is an issue with this repo, with stencil or with Ionic. I haven't found a related issue in any of those projects' issue trackers.)

When creating a new stencil project I expect to see an npm install message

Currently when I create a new project using create-stencil in the end the instructions are:

Next steps:
  $ cd stencil
  $ npm start

  Further reading:
   - https://github.com/ionic-team/stencil-component-starter

There is a missing step of installing the devDependencies (@stencil/core in this case) so I would expect to see:

Next steps:
  $ cd stencil
  $ npm install
  $ npm start

  Further reading:
   - https://github.com/ionic-team/stencil-component-starter

Error on Build

I decided to try out stencil after reading the docs, So I ran
npm init stencil app my-app

then in the app dir, i ran npm run build, but I got this error

> @stencil/[email protected] build /home/ekene/code/personal-projects/my-app
> stencil build --prerender

[38:57.4]  @stencil/core v0.11.0 🍇
[38:57.4]  build, app, prod mode, started ...
[38:57.6]  transpile started ...
[38:57.8]  transpile finished in 244 ms
[38:57.9]  module map started ...
[38:58.0]  generate styles started ...
[38:59.4]  compile global style start ...
[38:59.4]  compile global style start ...
[38:59.7]  compile global style finish in 300 ms
[38:59.7]  compile global style finish in 299 ms
[38:59.7]  generate styles finished in 1.62 s
[39:00.3]  module map finished in 2.42 s
[39:00.3]  generate bundles started ...
[39:00.5]  generate bundles finished in 243 ms
[39:00.5]  generate app files started ...
[39:08.6]  generate app files finished in 8.01 s
[39:10.5]  prerendering started ...
[39:10.5]  prerender, started: / ...
[39:11.1]  prerender, finished: / in 540 ms
[39:11.1]  prerendering failed in 548 ms

[ WARN  ]  build warn
           package.json "collection" property is required when generating a
           distribution and must be set to: dist/collection/collection-manifest.json

[ WARN  ]  build warn
           When generating a distribution it is recommended to choose a unique
           namespace rather than the default setting "App". Please updated the
           "namespace" config property within the stencil.config.js file.

[ WARN  ]  build warn
           package.json "types" property is required when generating a distribution.
           It's recommended to set the "types" property to:
           dist/types/components.d.ts

[ WARN  ]  build warn
           package.json "module" property is required when generating a
           distribution. It's recommended to set the "module" property to:
           dist/esm/index.js

[ WARN  ]  build warn
           package.json "main" property is required when generating a distribution.
           It's recommended to set the "main" property to: dist/index.js

[ ERROR ]  TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type
           string. Received type undefined at Url.parse (url.js:150:11) at
           Object.urlParse [as parse] (url.js:144:13) at getWritePathFromUrl
           (/home/ekene/code/personal-projects/my-app/node_modules/@stencil/core/dist/compiler/index.js:7620:38)
           at
           /home/ekene/code/personal-projects/my-app/node_modules/@stencil/core/dist/compiler/index.js:13933:26
           at Generator.next (<anonymous>) at
           /home/ekene/code/personal-projects/my-app/node_modules/@stencil/core/dist/compiler/index.js:13803:71
           at new Promise (<anonymous>) at __awaiter$E
           (/home/ekene/code/personal-projects/my-app/node_modules/@stencil/core/dist/compiler/index.js:13799:12)
           at writePrerenderDest
           (/home/ekene/code/personal-projects/my-app/node_modules/@stencil/core/dist/compiler/index.js:13931:12)
           at
           /home/ekene/code/personal-projects/my-app/node_modules/@stencil/core/dist/compiler/index.js:13917:19

[ ERROR ]  Cannot find module 'request' at Function.Module._resolveFilename
           (internal/modules/cjs/loader.js:594:15) at Function.Module._load
           (internal/modules/cjs/loader.js:520:25) at Module.require
           (internal/modules/cjs/loader.js:650:17) at require
           (internal/modules/cjs/helpers.js:20:18) at
           /home/ekene/code/personal-projects/my-app/node_modules/request-promise-native/lib/rp.js:8:12
           at module.exports
           (/home/ekene/code/personal-projects/my-app/node_modules/stealthy-require/lib/index.js:62:23)
           at Object.<anonymous>
           (/home/ekene/code/personal-projects/my-app/node_modules/request-promise-native/lib/rp.js:7:15)
           at Module._compile (internal/modules/cjs/loader.js:702:30) at
           Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10) at
           Module.load (internal/modules/cjs/loader.js:612:32)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @stencil/[email protected] build: `stencil build --prerender`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @stencil/[email protected] 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/ekene/.npm/_logs/2018-08-03T05_39_11_173Z-debug.log

Typescript complaining

Windows 10 x64
Visual Studio Code

There are six complaints from typescript in the code.

capture327

npm init stencil not working

When I run the init command and choose any of those options in promt it gave me:

Error: unable to get local issuer certificate
at TLSSocket.onConnectSecure (_tls_wrap.js:1058:34)
at TLSSocket.emit (events.js:198:13)
at TLSSocket._finishInit (_tls_wrap.js:636:8)
Emitted 'error' event at:
at TLSSocket.socketErrorListener (_http_client.js:392:9)
at TLSSocket.emit (events.js:198:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at process._tickCallback (internal/process/next_tick.js:63:19)

ionic4 theming not working

  • created an app using npm init stencil
  • chose PWA
  • added root css variables from the theme generator
  • configured stencil.config.ts outputTargets to include dist as well
  • added namespace to stencil.config.ts
  • ran npm run build and followed the needed files
  • followed instructions to add needed params to package.json like main, module, types etc..
  • imported this components library in my vuejs app
  • running my vuejs app, it doesn't see my CSS root variables, even though it sees the components as needed but not the colors, so if i tried <ion-button color="primary">Primary</ion-button>
    it comes as a white button instead of the actual primary color which is blue as initially created in the stencil repo.
    Please advise.
    Thanks

[ ERROR ] Cannot find module 'request' at Function.Module._resolveFilename

@manucorporat
Latest version.
Following instructions.

C:\ae\adaept.com\ionicons>npm list @stencil/core
@stencil/[email protected] C:\ae\adaept.com\ionicons
`-- @stencil/[email protected]


C:\ae\adaept.com\ionicons>
C:\ae\adaept.com>npm init stencil
npx: installed 1 in 2.407s
👋  Welcome to Stencil Create App!

   What kind of project do you want to create?

√ Pick a starter » 💎  app        (Minimal starter for building a Stencil app or website)
√ Project name ... ionicons

We are about to clone "ionic-team/stencil-app-starter" into "./ionicons"
√ Confirm? ... yes

 💎  Cloning ionic-team/stencil-app-starter...
 🏃‍  Changing directories...
 🔨  Preparing repo...
 📦  Installing packages...

 🎉  All done!

        cd ./ionicons
        npm start

Check out the docs: https://github.com/ionic-team/stencil-app-starter

C:\ae\adaept.com>cd ionicons

C:\ae\adaept.com\ionicons>npm start

> @stencil/[email protected] start C:\ae\adaept.com\ionicons
> stencil build --dev --watch --serve

[29:38.0]  @stencil/core v0.11.0
[29:38.0]  build, app, dev mode, started ...
[29:38.1]  transpile started ...
[29:40.4]  transpile finished in 2.27 s
[29:40.5]  module map started ...
[29:40.6]  generate styles started ...
[29:41.0]  compile global style start ...
[29:41.2]  compile global style finish in 224 ms
[29:41.2]  generate styles finished in 610 ms
[29:41.7]  module map finished in 1.20 s
[29:41.7]  generate bundles started ...
[29:41.7]  generate bundles finished in 12 ms
[29:41.7]  generate app files started ...
[29:43.7]  generate app files finished in 2.04 s

[ ERROR ]  Cannot find module 'request' at Function.Module._resolveFilename (module.js:547:15) at Function.Module._load
           (module.js:474:25) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at
           C:\ae\adaept.com\ionicons\node_modules\request-promise-native\lib\rp.js:8:12 at module.exports
           (C:\ae\adaept.com\ionicons\node_modules\stealthy-require\lib\index.js:62:23) at Object.<anonymous>
           (C:\ae\adaept.com\ionicons\node_modules\request-promise-native\lib\rp.js:7:15) at Module._compile
           (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32)

[29:43.8]  dev server: http://localhost:3333/
Terminate batch job (Y/N)? y

C:\ae\adaept.com\ionicons>

capture360

npm init stencil does not work behind corporate proxy

create-stencil is using the node https module for downloading the template. This module seems to ignore all proxy settings I have set:

  • PROXY environment variable
  • npm proxy setting
  • git proxy setting

I always see (independent from the template):

>npm init stencil
npx: installed 1 in 4.944s

√ Pick a starter » ionic-pwa
√ Project name » stencil-pwa

? Preparing starterevents.js:183
      throw er; // Unhandled 'error' event
      ^

Error: connect ETIMEDOUT 140.82.118.4:443
    at Object._errnoException (util.js:1022:11)
    at _exceptionWithHostPort (util.js:1044:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14)

Building the app breaks npm start

This is exactly what I have done, please let me know where I went wrong:
npm init stencil
Using the interactive mode, I used PWA and I have my repo's name set.

Next I pasted a theme from the ionic theme generator into my app.css file, created another sample component.
Running
npm start
Everything looks good as expected.

Now, I want to build.
changed in the stencil.config.ts
by adding both namespace and added the dist to my array of outputTargets.
I followed the instructions for building
npm run build
by adding main, module, collection all instructions coming in from console already.

After building that one time.
npm start
fails. app.css cannot be found.
image

Please advise if this is an issue or intentionally, or what am i missing to make a good usable build where i can use npm start even after the build has been done.

Thanks

bug: receive error '$t is not a constructor' when running cli

Prerequisites

Create Stencil Version

3.2.0

Current Behavior

Running npm init stencil fails with :

✖ $t is not a constructor

Expected Behavior

The expectation is that it creates a new stencil project starter.

Steps to Reproduce

Run the following:

npm install create-stencil@latest
npm init stencil

Additional Information

OS: Windows 10
Node Version: 18.12.1
NPM Version: 8.19.2

bug: Protocol "https:" not supported. Expected "http:"

Prerequisites

Create Stencil Version

3.1.1 (latest)

Current Behavior

⠋ Preparing starter
✖ Protocol "https:" not supported. Expected "http:"

⠸ Preparing starter ERROR  Command failed with exit code 1: /Users/akarachen/Library/pnpm/store/v3/tmp/dlx-7575/node_modules/.bin/create-stencil

Expected Behavior

Fetch project success.

Steps to Reproduce

pnpm create stencil@latest

Additional Information

System: MacOS 13 beta
Pnpm: 7.18.1
Node: 19.2.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.