Closed dhineeth closed 2 years ago
Hey there 👋
I apologize it took so long for someone on the team to acknowledge this issue. At this time, Stencil v1 and lower is no longer supported. As a result, I'm going to close this issue.
If this issue is still occurring in Stencil v2, can you please create a new issue for us with a minimal reproduction case? Thanks!
Stencil version:
I'm submitting a:
[ ] bug report
Current behavior:
Ran the command npm run build in the stencil app folder which has have generated the dist folder
Using the generated components in angular version 6.1.0 app as a package (locally by copy and paste. Not pushing into the npm registry) inside node_modules folder by pasting the dist folder like in the documentation "atai-charts/dist/" m getting the below error.
Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ ** 95% emitting LicenseWebpackPlugin(node:31116) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/home/daleti/DINITH/charts/marketing-app/client/node_modules/atai-charts/package.json' at Object.openSync (fs.js:451:3) at Object.readFileSync (fs.js:353:35) at LicenseExtractor.readPackageJson (/home/daleti/DINITH/charts/marketing-app/client/node_modules/license-webpack-plugin/dist/LicenseExtractor.js:126:23) at LicenseExtractor.parsePackage (/home/daleti/DINITH/charts/marketing-app/client/node_modules/license-webpack-plugin/dist/LicenseExtractor.js:23:32) at ModuleProcessor.processPackage (/home/daleti/DINITH/charts/marketing-app/client/node_modules/license-webpack-plugin/dist/ModuleProcessor.js:39:46) at ModuleProcessor.processFile (/home/daleti/DINITH/charts/marketing-app/client/node_modules/license-webpack-plugin/dist/ModuleProcessor.js:36:21) at fileCallback (/home/daleti/DINITH/charts/marketing-app/client/node_modules/license-webpack-plugin/dist/LicenseWebpackPlugin.js:107:61) at moduleCallback (/home/daleti/DINITH/charts/marketing-app/client/node_modules/license-webpack-plugin/dist/LicenseWebpackPlugin.js:114:21) at /home/daleti/DINITH/charts/marketing-app/client/node_modules/license-webpack-plugin/dist/LicenseWebpackPlugin.js:126:29 at Array.forEach (<anonymous>) at emitCallback (/home/daleti/DINITH/charts/marketing-app/client/node_modules/license-webpack-plugin/dist/LicenseWebpackPlugin.js:92:32) at eval (eval at create (/home/daleti/DINITH/charts/marketing-app/client/node_modules/tapable/lib/HookCodeFactory.js:24:12), <anonymous>:19:1) at callback (/home/daleti/DINITH/charts/marketing-app/client/node_modules/copy-webpack-plugin/dist/index.js:77:17) at /home/daleti/DINITH/charts/marketing-app/client/node_modules/copy-webpack-plugin/dist/index.js:118:24 (node:31116) 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(). (rejection id: 4) (node:31116) [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.
The package.json is found inside the loader folder of the dist folder. But angular is expecting the package.json in the root of the package folder inside the node_modules
When i m doing the same in an angular app with version 8.3.x the components are working fine when i m doing ng serve and even in a production build.
Expected behavior:
The ng serve should compile the angular app version 6.1.0 successfully and we should be able to use the components in the angular app version 6.1.0.
Steps to reproduce:
Related code: Stencil config file
Below is the main.ts file in angular app
Other information: