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

npm start fails out of the gate #48

Closed eriklharper closed 5 years ago

eriklharper commented 6 years ago

Resources: Before submitting an issue, please consult our docs.

Stencil version: (run npm list @stencil/core from a terminal/cmd prompt and paste output below):

npm list @stencil/core
@stencil/starter@0.0.1 /Users/Erik/code/eriklharper/stencil-app-starter
└── @stencil/core@0.7.26

I'm submitting a ... (check one with "x")

Current behavior: git clone stencil-app-starter, run npm install and npm start results in build failed errors (see below)

Expected behavior: No build errors

Steps to reproduce: git clone stencil-app-starter, run npm install and npm start results in build failed errors (see below)

Related code:

npm start

> @stencil/starter@0.0.1 start /Users/Erik/code/eriklharper/stencil-app-starter
> npm run dev

> @stencil/starter@0.0.1 dev /Users/Erik/code/eriklharper/stencil-app-starter
> sd concurrent "stencil build --dev --watch" "stencil-dev-server"

[57:30.6]  @stencil/core v0.7.26 👻
[57:30.6]  build, app, dev mode, started ...
[57:30.6]  compile started ...
[57:36.6]  compile finished in 5.99 s

[ ERROR ]  typescript: node_modules/@types/node/index.d.ts, line: 2381
           Duplicate identifier 'URL'.

   L2380:      values(): IterableIterator<string>;
   L2381:      [Symbol.iterator](): IterableIterator<[string, string]>;

[ ERROR ]  typescript: node_modules/@types/node/index.d.ts, line: 2399
           Duplicate identifier 'URLSearchParams'.

   L2399:      export interface LookupOneOptions extends LookupOptions {
   L2400:          all?: false;

[ ERROR ]  typescript: node_modules/@types/node/index.d.ts, line: 2417
           Cannot export 'URL'. Only local declarations can be exported from a module.

   L2416:      export function lookup(hostname: string, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void;
   L2418:      // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.

[ ERROR ]  typescript: node_modules/@types/node/index.d.ts, line: 2417
           Cannot export 'URLSearchParams'. Only local declarations can be exported from a module.

   L2416:      export function lookup(hostname: string, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void;
   L2418:      // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.

[ ERROR ]  typescript: node_modules/typescript/lib/lib.dom.d.ts, line: 13401
           Duplicate identifier 'URL'.

  L13400:  interface URLSearchParams {
  L13402:       * Appends a specified key/value pair as a new search parameter.

[ ERROR ]  typescript: node_modules/typescript/lib/lib.dom.d.ts, line: 13424
           Duplicate identifier 'URLSearchParams'.

  L13424:      set(name: string, value: string): void;

[57:36.6]  build failed, watching for changes... in 6.01 s

Running: node v8.10.0 npm v5.6.0

thepian commented 6 years ago

Also fails with node 9.9 and yarn build

Figured out the fix. Install @types/node version 9.6.7

They released 10.0.0 recently I'd recommend setting more strict version dependencies

kensodemann commented 5 years ago

This seems to be working with the latest version of the starter so I am going to close this. Please try this with the latest version and let me know if you are still having an issue.