Title: update-ns-webpack, error updating webpack config · Issue #1144 · NativeScript/nativescript-dev-webpack · GitHub
Open Graph Title: update-ns-webpack, error updating webpack config · Issue #1144 · NativeScript/nativescript-dev-webpack
X Title: update-ns-webpack, error updating webpack config · Issue #1144 · NativeScript/nativescript-dev-webpack
Description: Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): CLI: 6.8.0 Plugin(s): nativescript-stripe Node.j...
Open Graph Description: Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): CLI: 6.8...
X Description: Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): CLI: 6.8...
Opengraph URL: https://github.com/NativeScript/nativescript-dev-webpack/issues/1144
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"update-ns-webpack, error updating webpack config","articleBody":"**Environment**\r\nProvide version numbers for the following components (information can be retrieved by running `tns info` in your project folder or by inspecting the `package.json` of the project):\r\n - CLI: 6.8.0\r\n - Plugin(s): nativescript-stripe\r\n - Node.js: v12.18.3\r\n \r\n - [x] Please, attach your package.json and webpack.config.js as these configurations are usually critical for investigating issues with webpack\r\n \r\n- package.json: https://pastebin.pl/view/13670ec9\r\n- webpack.config.js: https://pastebin.pl/view/4b6a757b\r\n\r\n**Describe the bug**\r\n\r\nError showing after launching `./node_modules/.bin/update-ns-webpack --configs`:\r\n\r\n```\r\ninternal/modules/cjs/loader.js:968\r\n throw err;\r\n ^\r\n\r\nError: Cannot find module '../projectHelpers'\r\nRequire stack:\r\n- **project_dir**/node_modules/@nativescript/webpack/verify/update.js\r\n- **project_dir**/node_modules/@nativescript/webpack/bin/update-ns-webpack\r\n at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)\r\n at Function.Module._load (internal/modules/cjs/loader.js:841:27)\r\n at Module.require (internal/modules/cjs/loader.js:1025:19)\r\n at require (internal/modules/cjs/helpers.js:72:18)\r\n at Object.\u003canonymous\u003e (**project_dir**/node_modules/@nativescript/webpack/verify/update.js:8:5)\r\n at Module._compile (internal/modules/cjs/loader.js:1137:30)\r\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)\r\n at Module.load (internal/modules/cjs/loader.js:985:32)\r\n at Function.Module._load (internal/modules/cjs/loader.js:878:14)\r\n at Module.require (internal/modules/cjs/loader.js:1025:19) {\r\n code: 'MODULE_NOT_FOUND',\r\n requireStack: [\r\n '**project_dir**/node_modules/@nativescript/webpack/verify/update.js',\r\n '**project_dir**/node_modules/@nativescript/webpack/bin/update-ns-webpack'\r\n ]\r\n}\r\n```\r\n_(paths are hidden by myself, they're showing correctly in the original output)_\r\n\r\n\r\n**To Reproduce**\r\nI was updating an old project (a plugin), after running `npm install` i received a notice: \r\n```\r\nNote: webpack.config.js is different than the suggested @nativescript/webpack config at ..project_dir/node_modules/@nativescript/webpack/templates/webpack.angular.js.\r\nIf you have build trouble you can update to latest config using \"./node_modules/.bin/update-ns-webpack --configs\" command.\r\n```\r\nRunning the suggested command is throwing the error.\r\n\r\n**Expected behavior**\r\n- the update command should be updated to the latest version\r\n- it should update your webpack configuration without any errors\r\n\r\n**Additional context**\r\nI was going to open a PR to fix this, unfortunately the github repo doesn't seem to be aligned with the latest npm release (2.1.3), the most updated branch (feat/webpack-updates) is at 2.0.0-alpha.3 ... Please, if possible keep repo's tags aligned in order to let people contribute ;) \r\n\r\n** Fix ** \r\n\r\n```\r\nconst {\r\n getPackageJson,\r\n getProjectDir,\r\n writePackageJson,\r\n} = require(\"../projectHelpers\");\r\n```\r\n\r\nReplace with:\r\n\r\n```\r\nconst {\r\n getPackageJson,\r\n getProjectDir,\r\n writePackageJson,\r\n} = require(\"../helpers/projectHelpers\");\r\n```","author":{"url":"https://github.com/trane77","@type":"Person","name":"trane77"},"datePublished":"2020-08-13T05:58:48.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1144/nativescript-dev-webpack/issues/1144"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9678baf1-c7c0-40ee-0328-2a8e7b854a04 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9336:2F76D:34AD69E:43A9706:6975A894 |
| html-safe-nonce | a058bb0f1c2385d84594fa6a213e2cedecc4d6669f44617c38e4239d992a4a02 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MzM2OjJGNzZEOjM0QUQ2OUU6NDNBOTcwNjo2OTc1QTg5NCIsInZpc2l0b3JfaWQiOiIyMzAzNDA1NTY1NTAyOTI0OTQ4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a9f7ec96c2f906f99326c7d4b0eeb39b80fca8193269eee7ff60d95ee799a486 |
| hovercard-subject-tag | issue:678175708 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/nativescript-dev-webpack/1144/issue_layout |
| twitter:image | https://opengraph.githubassets.com/57a2786a7d2cb3478ef1c3fd065db107d8c084b130486ece6e535253a36c4f4b/NativeScript/nativescript-dev-webpack/issues/1144 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/57a2786a7d2cb3478ef1c3fd065db107d8c084b130486ece6e535253a36c4f4b/NativeScript/nativescript-dev-webpack/issues/1144 |
| og:image:alt | Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): CLI: 6.8... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | trane77 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f |
| turbo-cache-control | no-preview |
| go-import | github.com/NativeScript/nativescript-dev-webpack git https://github.com/NativeScript/nativescript-dev-webpack.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 54984270 |
| octolytics-dimension-repository_nwo | NativeScript/nativescript-dev-webpack |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 54984270 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/nativescript-dev-webpack |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 488b30e96dfd057fbbe44c6665ccbc030b729dde |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width