Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using npm init stencil, build fails on fresh project #1313

Closed
positlabs opened this issue Jan 10, 2019 · 8 comments
Closed

Using npm init stencil, build fails on fresh project #1313

positlabs opened this issue Jan 10, 2019 · 8 comments
Labels
ionitron: stale issue This issue has not seen any activity for a long period of time

Comments

@positlabs
Copy link

Stencil version:

 @stencil/core@~0.16.2

I'm submitting a:

[x] bug report
[ ] feature request
[ ] support request

Current behavior:

Trying to build (npm run build) the project fails with an error.

It's worth noting that the npm start aka stencil build --dev --watch --serve command DOES work.

Expected behavior:

Project builds with no error

Steps to reproduce:

Using Node 8.15.0 and npm 6.4.1

npm init stencil
✔ Pick a starter › app
✔ Project name › stencil-test
cd stencil-test/
npm run build

[ Error ]  TypeError: Cannot read property 'toString' of undefined at e.getRenderedHash
           (/workspace/stencil-test/node_modules/@stencil/core/dist/sys/node/index.js:1:324262) at
           /workspace/stencil-test/node_modules/@stencil/core/dist/sys/node/index.js:1:325017 at
           e.visitDependencies
           (/workspace/stencil-test/node_modules/@stencil/core/dist/sys/node/index.js:1:324643) at
           e.computeContentHashWithDependencies
           (/workspace/stencil-test/node_modules/@stencil/core/dist/sys/node/index.js:1:324921) at
           /workspace/stencil-test/node_modules/@stencil/core/dist/sys/node/index.js:1:329531 at
           /workspace/stencil-test/node_modules/@stencil/core/dist/sys/node/index.js:1:313503 at
           String.replace (<anonymous>) at renderNamePattern
           (/workspace/stencil-test/node_modules/@stencil/core/dist/sys/node/index.js:1:313462) at
           e.generateId
           (/workspace/stencil-test/node_modules/@stencil/core/dist/sys/node/index.js:1:329417) at
           assignChunkIds
           (/workspace/stencil-test/node_modules/@stencil/core/dist/sys/node/index.js:1:455624)
@ionitron-bot ionitron-bot bot added the triage label Jan 10, 2019
@snaptopixel
Copy link
Contributor

I'm having the same issue as @positlabs but with an existing project. In my case it seems to be related to using @stencil/router components in multiple files.

@snaptopixel
Copy link
Contributor

Yup, I generated a new project got the build error then deleted the stencil-router-link from app-home.tsx and it built fine.

@basudebpalfreelancer
Copy link

basudebpalfreelancer commented Jan 16, 2019

I have faced the same problem. npm start works, but npm run build fails with an error that matches to the error message in this bug report. I am using stencil v0.16.4.
v0.16.3 shows the same error.
v0.16.2 has the same error.
v0.16.1 does not have build error

@basudebpalfreelancer
Copy link

seems like this is related to this problem
rollup/rollup#2625

@basudebpalfreelancer
Copy link

creating ionic pwa with npm init stencil does not result in a build failure with stencil v0.16.4
creating stencil component with npm init stencil does not result in a build failure with stencil v0.16.4
creating stencil app with npm init stencil results in a build failure with stencil v0.16.4

@adamdbradley adamdbradley added bug and removed triage labels Jan 16, 2019
@hdoro
Copy link

hdoro commented Jan 17, 2019

I was facing the same issue, but the new 0.17.0-0 version solves it somehow!

I'm using stencil-router@0.3.2 :)

@basudebpalfreelancer
Copy link

basudebpalfreelancer commented Jan 19, 2019

v0.17.0 does not have build error

@ionitron-bot ionitron-bot bot added the ionitron: stale issue This issue has not seen any activity for a long period of time label Feb 18, 2019
@ionitron-bot
Copy link

ionitron-bot bot commented Feb 18, 2019

Thanks for the issue! This issue is being closed due to inactivity. If this is still an issue with the latest version of Stencil, please create a new issue and ensure the template is fully filled out.

Thank you for using Stencil!

@ionitron-bot ionitron-bot bot closed this as completed Feb 18, 2019
@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Feb 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ionitron: stale issue This issue has not seen any activity for a long period of time
Projects
None yet
Development

No branches or pull requests

5 participants