<Stencil>: Build of new project fails
See original GitHub issueDescribe the bug When running a build on fresh Stencil project, the build fails with this error:
> nx run mobile-app:build --verbose
(0 , fileutils_1.writeJsonFile) is not a function
TypeError: (0 , fileutils_1.writeJsonFile) is not a function
at copyOrCreatePackageJson (C:\Users\istil\Projects\nx-stencil\node_modules\@nxext\stencil\src\executors\stencil-runtime\prepare-config-and-outputarget-paths.js:42:39)
at prepareDistDirAndPkgJson (C:\Users\istil\Projects\nx-stencil\node_modules\@nxext\stencil\src\executors\stencil-runtime\prepare-config-and-outputarget-paths.js:63:5)
at C:\Users\istil\Projects\nx-stencil\node_modules\@nxext\stencil\src\executors\stencil-runtime\prepare-config-and-outputarget-paths.js:67:9
at Generator.next (<anonymous>)
at C:\Users\istil\Projects\nx-stencil\node_modules\tslib\tslib.js:117:75
at new Promise (<anonymous>)
at __awaiter (C:\Users\istil\Projects\nx-stencil\node_modules\tslib\tslib.js:113:16)
at prepareConfigAndOutputargetPaths (C:\Users\istil\Projects\nx-stencil\node_modules\@nxext\stencil\src\executors\stencil-runtime\prepare-config-and-outputarget-paths.js:66:34)
at C:\Users\istil\Projects\nx-stencil\node_modules\@nxext\stencil\src\executors\build\executor.js:37:92
at Generator.next (<anonymous>)
βββββββββββββββββββββββββββββββββββββββββββββββ
> NX ERROR Running target "mobile-app:build" failed
Failed tasks:
- mobile-app:build
Hint: run the command with --verbose for more details.
nx report
output:
NX Report complete - copy this into the issue template
Node : 16.13.1
OS : win32 x64
npm : 8.3.0
nx : 13.4.3
@nrwl/angular : 13.4.3
@nrwl/cli : 13.4.3
@nrwl/cypress : 13.4.3
@nrwl/devkit : 13.4.3
@nrwl/eslint-plugin-nx : 13.4.3
@nrwl/express : 13.4.3
@nrwl/jest : 13.4.3
@nrwl/linter : 13.4.3
@nrwl/nest : 13.4.3
@nrwl/next : undefined
@nrwl/node : 13.4.3
@nrwl/nx-cloud : undefined
@nrwl/react : 13.4.3
@nrwl/react-native : undefined
@nrwl/schematics : undefined
@nrwl/tao : 13.4.3
@nrwl/web : 13.4.3
@nrwl/workspace : 13.4.3
@nrwl/storybook : 13.4.3
@nrwl/gatsby : undefined
typescript : 4.4.4
rxjs : 6.6.7
---------------------------------------
Community plugins:
@nxext/stencil: 13.1.0
(node:9152) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at C:\Users\istil\Projects\nx-stencil\node_modules\tslib\package.json.
Update this package.json to use a subpath pattern like "./*".
(Use `node --trace-deprecation ...` to show where the warning was created)
To Reproduce
- Create new NX workspace using
npx create-nx-workspace {{name}}
- Create new Stencil project using
nx g @nxext/stencil:app mobile-app --style=scss
- Run build using
nx build {{name}} --verbose
Expected behavior It is expected that the build finishes without issues.
Additional context Node versions:
- 16.13.1 with npm@8.3.0
- 14.18.1 with npm@6.14.15
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Using npm init stencil, build fails on fresh project #1313 - GitHub
Current behavior: Trying to build ( npm run build ) the project fails with an error. It's worth noting that the npm start...
Read more >Build Fails on every project, even new ones - Stencil
Hello, today it seems that i broke something. When running npm run build it gives an error not by my code [ ERROR...
Read more >Stenciljs error while project initialization - Stack Overflow
I am trying to create a new stenciljs project using the provided command npm init stencil. After running the above command, i get...
Read more >Troubleshooting Your Setup | BigCommerce Dev Center
If you get an unexpected error message or unexpected results upon executing the stencil init , stencil start , or other Stencil CLI...
Read more >Integrated Dev Server Config - Stencil.js
By integrating the build process and the dev server, Stencil is able to ... When a development error is shown and overlays the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@eglove Itβs hard to find a versioning schema that covers the Nx compatibility and own changes ^^β even more since there are breaking changes in Nx minor versions.
Could you add the output of: nx report?