module 'lfs' not found

Good Day 

Hey developers i’m using visual studio to build my project which i’m using LuaFileSystem lfs=require(“lfs”), when running the simulator i get this error:

module ‘lfs’ not found:

no field package.preload[‘lfs’]

no file ‘C:\Data\Programs{D7C4DBDC-44FD-40DF-9DDC-3615142304A7}\Install\lfs.lua’

no file ‘C:\Data\Programs{D7C4DBDC-44FD-40DF-9DDC-3615142304A7}\Install\Assets\Corona\lfs.lua’

no file ‘C:\Data\Programs{D7C4DBDC-44FD-40DF-9DDC-3615142304A7}\Install\Assets\Corona\lfs.lua’

no file ‘.\lfs.lua’

no file ‘!\lua\lfs.lua’

no file ‘!\lua\lfs\init.lua’

no file ‘!\lfs.lua’

no file ‘!\lfs\init.lua’

no file ‘C:\Data\Programs{D7C4DBDC-44FD-40DF-9DDC-3615142304A7}\Install\lfs.dll’

no file ‘.\lfs.dll’

no file ‘C:\Data\Programs{D7C4DBDC-44FD-40DF-9DDC-3615142304A7}\Install\Assets\Corona\lfs.dll’

no file ‘.\lfs.dll’

no file ‘!\lfs.dll’

no file ‘!\loadall.dll’

stack traceback:

[C]: in function ‘require’

?: in function ‘require’ 

can anyone help???

kind regards

clifford

LFS (Lua File System) library is not supported on WP8.  This is a 3rd party library (not developed by Corona Labs) which does not compile for this platform.  So, you can’t use it for the time being.

You can see what APIs/features are supported on WP8 here…

   http://docs.coronalabs.com/daily/coronacards/wp8/support.html

ok thanks, so how can i overcome such situation?

You can’t use the LFS library on WP8.  So, you have to avoid loading it and using it like this…

-- Load the LFS library, if it is available. local lfs = nil if (system.getInfo("platform") ~= "WinPhone") then lfs = require("lfs") end -- Only call LFS APIs if loaded. if lfs then local currentDirectory = lfs.currentdir() end

LFS (Lua File System) library is not supported on WP8.  This is a 3rd party library (not developed by Corona Labs) which does not compile for this platform.  So, you can’t use it for the time being.

You can see what APIs/features are supported on WP8 here…

   http://docs.coronalabs.com/daily/coronacards/wp8/support.html

ok thanks, so how can i overcome such situation?

You can’t use the LFS library on WP8.  So, you have to avoid loading it and using it like this…

-- Load the LFS library, if it is available. local lfs = nil if (system.getInfo("platform") ~= "WinPhone") then lfs = require("lfs") end -- Only call LFS APIs if loaded. if lfs then local currentDirectory = lfs.currentdir() end