Error: Cannot find module 'LanguageData' in command line build

Error: Cannot find module 'LanguageData' in command line build
0

#1

I’m using:

I import it like all the examples:
const i18n = require("LanguageData");

It works well in local development and from the GUI build. But if I use the command line build, it shows the following error:

[23008] Start building assets
[23008] Start spawn build-worker
[23008] Finish spawn build-worker
[23008] Start init build-worker
[23008] load script [LanguageData] failed : Error: Cannot find module 'LanguageData'
    at Module._resolveFilename (module.js:470:15)
    at Function.Module._resolveFilename [as _resolveFilenameVendor] (C:\CocosCreator\resources\electron.asar\common\reset-search-paths.js:35:12)
    at Function.s._resolveFilename (C:\CocosCreator\resources\app.asar\editor\page\project-scripts.js:1:941)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.cc.require (C:\CocosCreator\resources\app.asar\editor\page\project-scripts.js:1:589)
    at C:\project-folder\temp\quick-scripts\assets\scripts\components\managers\networkManager.js:1:377
    at __define (C:\project-folder\temp\quick-scripts\assets\scripts\components\managers\networkManager.js:20:12)
    at C:\project-folder\temp\quick-scripts\assets\scripts\components\managers\networkManager.js:127:13

To build I use:
C:\CocosCreator\CocosCreator.exe --path . --build "platform=web-desktop;inlineSpriteFrames=true;debug=false"

Any solutions? We need command line build for Jenkins


#2

me too
please help me @slackmoehrle @pandamicro


#3

I am not sure. Let us ask @jare to read this topic.


#4

Sorry guys. This is a bug of 2.0.7/2.1.0
It was fixed in 2.0.8. Also will be fixed in 2.1.1