renative: Cannot build when using yarn - webpack.js not found
Describe the bug
The same problem described in https://github.com/pavjacko/renative/issues/585 is still a problem when building via rnv build
This time it is webpack
itself.
Cannot find module '/my/path/smarttv-platforms/node_modules/rnv/node_modules/webpack/bin/webpack.js'
Expected behavior App should build.
Screenshots or copy&paste
❯ ./node_modules/.bin/rnv build -p tizen
┌──────────────────────────────────────────────────────────────────────────────┐
│ │
│ ██████╗ ███████╗███╗ ██╗ █████╗ ████████╗██╗██╗ ██╗███████╗ │
│ ██╔══██╗██╔════╝████╗ ██║██╔══██╗╚══██╔══╝██║██║ ██║██╔════╝ │
│ ██████╔╝█████╗ ██╔██╗ ██║███████║ ██║ ██║██║ ██║█████╗ │
│ ██╔══██╗██╔══╝ ██║╚██╗██║██╔══██║ ██║ ██║╚██╗ ██╔╝██╔══╝ │
│ ██║ ██║███████╗██║ ╚████║██║ ██║ ██║ ██║ ╚████╔╝ ███████╗ │
│ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═══╝ ╚══════╝ │
│ │
│ Version: 0.31.0 │
│ https://renative.org │
│ 🚀 Firing up!... │
│ $ rnv build -p tizen │
│ Start Time: 10/13/2020, 6:11:03 PM │
│ │
└──────────────────────────────────────────────────────────────────────────────┘
[ task ] registerEngines[1]
[ task ] configureRuntimeDefaults[1] appId:null
[ task ] checkAndMigrateProject[1]
[ task ] parseRenativeConfigs[1]
[ task ] getWorkspaceDirPath[1]
[ task ] loadPluginTemplates[1]
[ task ] _parsePluginTemplateDependencies[1] scope:root
[ task ] loadEngines[1]
[ task ] _generatePlatformTemplatePaths[1]
[ info ] Current Engine: engine-rn-web
[ task ] initializeTask[1] build
[ task ] => [build]
[ task ] [build] checkIfProjectAndNodeModulesExists[1]
[ hook ] [build] executePipe ('build:before')
[ task ] [build] taskRnvBuild[1] parent:null
[ task ] => [build] => [package]
[ hook ] [package] executePipe ('package:before')
[ task ] [package] taskRnvPackage[1] parent:build
[ task ] => [package] => [configure]
[ hook ] [configure] executePipe ('configure:before')
[ task ] [configure] taskRnvConfigure[1]
[ task ] => [configure] => [platform configure]
[ hook ] [platform configure] executePipe ('platform:configure:before')
[ task ] [platform configure] taskRnvPlatformConfigure[1]
[ task ] => [platform configure] => [project configure]
[ hook ] [project configure] executePipe ('project:configure:before')
[ task ] [project configure] taskRnvProjectConfigure[1]
[ task ] [project configure] checkAndMigrateProject[2]
[ task ] [project configure] parseRenativeConfigs[2]
[ task ] [project configure] getWorkspaceDirPath[2]
[ task ] [project configure] loadPluginTemplates[2]
[ task ] [project configure] _parsePluginTemplateDependencies[2] scope:root
[ task ] [project configure] loadEngines[2]
[ task ] [project configure] _generatePlatformTemplatePaths[2]
[ task ] [project configure] checkAndCreateProjectPackage[1]
[ task ] => [project configure] => [workspace configure]
[ task ] [workspace configure] taskRnvWorkspaceConfigure[1]
[ task ] <= [project configure] <= workspace configure
[ task ] [project configure] checkIfTemplateConfigured[1]
[ task ] => [project configure] => [install]
[ hook ] [install] executePipe ('install:before')
[ task ] [install] taskRnvInstall[1] requiresInstall:false:true
[ hook ] [install] executePipe ('install:after')
[ task ] <= [project configure] <= install
[ task ] [project configure] checkCrypto[1]
[ task ] [project configure] configureRuntimeDefaults[2] appId:blank
[ task ] [project configure] applyTemplate[1] renative-template-blank=>undefined
[ task ] [project configure] _applyTemplate[1] current:renative-template-blank selected:undefined
[ task ] [project configure] configureRuntimeDefaults[3] appId:blank
[ task ] => [project configure] => [install]
[ hook ] [install] executePipe ('install:before')
[ task ] [install] taskRnvInstall[2] requiresInstall:false:true
[ hook ] [install] executePipe ('install:after')
[ task ] <= [project configure] <= install
[ task ] => [project configure] => [app configure]
[ hook ] [app configure] executePipe ('app:configure:before')
[ task ] [app configure] taskRnvAppConfigure[1]
[ task ] [app configure] listAppConfigsFoldersSync[1] ignoreHiddenConfigs:true
[ task ] [app configure] parseRenativeConfigs[3]
[ task ] [app configure] generateBuildConfig[1] size:122.88 KB
[ task ] [app configure] getWorkspaceDirPath[3]
[ task ] [app configure] generateBuildConfig[2] size:122.88 KB
[ task ] [app configure] generateBuildConfig[3] size:122.88 KB
[ task ] [app configure] loadPluginTemplates[3]
[ task ] [app configure] _parsePluginTemplateDependencies[3] scope:root
[ task ] [app configure] loadEngines[3]
[ task ] [app configure] generateBuildConfig[4] size:122.88 KB
[ task ] [app configure] _generatePlatformTemplatePaths[3]
[ task ] [app configure] generateBuildConfig[5] size:123.54 KB
[ task ] [app configure] generateBuildConfig[6] size:123.54 KB
[ task ] [app configure] getWorkspaceDirPath[4]
[ task ] [app configure] generateBuildConfig[7] size:123.54 KB
[ task ] [app configure] generateLocalConfig[1] resetAppId:false
[ task ] [app configure] generateBuildConfig[8] size:123.54 KB
[ info ] [app configure] Current App Config: blank
[ hook ] [app configure] executePipe ('app:configure:after')
[ task ] <= [project configure] <= app configure
[ task ] [project configure] resolvePluginDependants[1]
[ task ] [project configure] configurePlugins[1]
[ task ] [project configure] versionCheck[1]
[ task ] [project configure] versionCheck:rnvRunner:0.31.0,rnvProject:0.31.0[1]
[ task ] [project configure] configureRuntimeDefaults[4] appId:blank
[ task ] [project configure] copyRuntimeAssets[1]
[ task ] [project configure] parseFonts[1]
[ task ] [project configure] configureTemplateFiles[1]
[ task ] [project configure] fixRenativeConfigsSync[1]
[ task ] [project configure] checkAndCreateGitignore[1]
[ task ] [project configure] configureEntryPoints[1]
[ warn ] [project configure] Extra platform android will be ignored because it's not configured in your ./renative.json: { defaults.supportedPlatforms } object.
[ warn ] [project configure] Extra platform androidwear will be ignored because it's not configured in your ./renative.json: { defaults.supportedPlatforms } object.
[ warn ] [project configure] Extra platform androidtv will be ignored because it's not configured in your ./renative.json: { defaults.supportedPlatforms } object.
[ task ] [project configure] generateRuntimeConfig[1]
[ task ] [project configure] overrideTemplatePlugins[1]
[ task ] [project configure] parsePlugins[1]
[ hook ] [project configure] executePipe ('project:configure:after')
[ task ] <= [platform configure] <= project configure
[ task ] [platform configure] isPlatformSupported[1]
[ task ] [platform configure] checkAndConfigureSdks[1]
[ task ] [platform configure] checkAndConfigureTizenSdks:tizen[1]
[ task ] [platform configure] isBuildSchemeSupported[1]
[ info ] [platform configure] Current Build Scheme: debug
[ task ] [platform configure] checkSdk[1]
[ task ] [platform configure] _isSdkInstalled[1]
[ task ] [platform configure] configureRuntimeDefaults[5] appId:blank
[ task ] => [platform configure] => [install]
[ hook ] [install] executePipe ('install:before')
[ task ] [install] taskRnvInstall[3] requiresInstall:false:true
[ hook ] [install] executePipe ('install:after')
[ task ] <= [platform configure] <= install
[ task ] [platform configure] [1] taskRnvPlatformConfigure hasBuildFolderPresent:true
[ task ] [platform configure] createPlatformBuild[1]
[ task ] [platform configure] injectPlatformDependencies[1]
[ hook ] [platform configure] executePipe ('platform:configure:after')
[ task ] <= [configure] <= platform configure
[ task ] [configure] copySharedPlatforms[1]
[ task ] [configure] configureTizenProject[1]
[ task ] [configure] configureTizenGlobal[1]
[ task ] [configure] copyAssetsFolder[1]
[ task ] [configure] configureCoreWebProject[1]
[ task ] [configure] _generateWebpackConfigs[1]
[ task ] [configure] parsePlugins[2]
[ task ] [configure] configureProject[1]
[ task ] [configure] copyBuildsFolder[1]
[ task ] [configure] copyTemplatePluginsSync[1] (./platformBuilds/blank_tizen)
[ task ] [configure] parsePlugins[3]
[ hook ] [configure] executePipe ('configure:after')
[ task ] <= [package] <= configure
[ hook ] [package] executePipe ('package:after')
[ task ] <= [build] <= package
[ task ] [build] buildTizenProject[1]
[ task ] [build] buildWeb[1]
✖ FAILED: npx cross-env PLATFORM=tizen NODE_ENV=production node /my/path/smarttv-platforms/node_modules/rnv/node_modules/webpack/bin/webpack.js -p --config ./platformBuilds/blank_tizen/webpack.config.prod.js
┌──────────────────────────────────────────────────────────────────────────────┐
│ 🚀 SUMMARY | 10/13/2020, 6:11:04 PM │
│ $ rnv build -p tizen │
├──────────────────────────────────────────────────────────────────────────────┤
│ ReNative Version: 0.31.0 │
│ Project Name ($package.name): smarttv-platforms │
│ Project Version ($package.version): 0.1.0 │
│ Workspace ($.workspaceID): rnv │
│ Platform (-p): tizen │
│ Engine ($.platforms.tizen.engine): engine-rn-web │
│ App Config (-c): blank │
│ Build Scheme (-s): debug │
│ Target (-t): T-samsung-5.5-x86 │
│ Supported Platforms: tizen │
│ Env Info: darwin | x64 | node v10.21.0 │
│ Executed Time: 0h:0m:0s:587ms │
│ │
│ [ warn ] [project configure] Extra platform android will be ignored because it's not configured in your ./renative.json: { defaults.supportedPlatforms } object.
│ [ warn ] [project configure] Extra platform androidwear will be ignored because it's not configured in your ./renative.json: { defaults.supportedPlatforms } object.
│ [ warn ] [project configure] Extra platform androidtv will be ignored because it's not configured in your ./renative.json: { defaults.supportedPlatforms } object.
│ [ error ] [build] COMMAND:
npx cross-env PLATFORM=tizen NODE_ENV=production node /my/path/smarttv-platforms/node_modules/rnv/node_modules/webpack/bin/webpack.js -p --config ./platformBuilds/blank_tizen/webpack.config.prod.js
FAILED with ERROR:
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module '/my/path/smarttv-platforms/node_modules/rnv/node_modules/webpack/bin/webpack.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
│ │
│ Project location: │
│ ./platformBuilds/blank_tizen/project │
└──────────────────────────────────────────────────────────────────────────────┘
Desktop (please complete the following information):
- OS: MacOS
- Node Version 0.10.21.0
- RNV Version 0.31.0
- yarn 1.21.1
Additional context Renative Project is within a subdirectory of another yarn project.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 18 (9 by maintainers)
@VladLegkowski this works for me: https://github.com/simpleTechs/renative/tree/simpleTechs That is the change: https://github.com/simpleTechs/renative/commit/8a9446d15f8585d4e251fcfc22177ff4fcf089eb#diff-2fe34df7a4d5ff39cd67b3c6b5c06a43c88aa0dafb62c1803f99d1612c68ac7cL56
@alaingoga Of the top of my head it was the sdk-webpack.js file and I just changed it manually for the build, if I remember correctly