flex-plugin-builder icon indicating copy to clipboard operation
flex-plugin-builder copied to clipboard

[BUG]

Open oarvindjha opened this issue 3 years ago • 7 comments

twilio-cli encountered an unexpected error while run "twilio flex:plugins:start" command

D:\New folder\Sirva\flexplugins\plugin-customer-form>twilio flex:plugins:start -l debug [DEBUG] Config File: C:\Users\ARVIND OJHA.twilio-cli\config.json [DEBUG] Using profile: Test3Plugin [DEBUG] Using Flex Plugins Config File: C:\Users\ARVIND OJHA.twilio-cli\flex\plugins.json Using profile Test3Plugin (AC6bfa13b516ade5eef5bc5e9ce68370bd)

Checking Flex plugin project directory [DEBUG] Found command "flex:plugins:start" plugin: @twilio-labs/plugin-flex » twilio-cli encountered an unexpected error. To report this issue, execute the command with the "-l debug" flag, then copy the output to a new issue here: "https://github.com/twilio/flex-plugin-builder/issues" [DEBUG] Unexpected token in JSON at position 0 [DEBUG] SyntaxError: Unexpected token in JSON at position 0 at JSON.parse () at Object.readJsonFile (C:\Users\ARVIND OJHA.twilio-cli\node_modules\flex-dev-utils\dist\fs.js:227:17) at Object.readPluginsJson (C:\Users\ARVIND OJHA.twilio-cli\node_modules\flex-dev-utils\dist\fs.js:251:20) at parseUserInputPlugins (C:\Users\ARVIND OJHA.twilio-cli\node_modules\flex-plugin-scripts\dist\utils\parser.js:22:23) at _setPluginDir (C:\Users\ARVIND OJHA.twilio-cli\node_modules\flex-plugin-scripts\dist\scripts\pre-script-check.js:201:59) at C:\Users\ARVIND OJHA.twilio-cli\node_modules\flex-plugin-scripts\dist\scripts\pre-script-check.js:223:43 at step (C:\Users\ARVIND OJHA.twilio-cli\node_modules\flex-plugin-scripts\dist\scripts\pre-script-check.js:33:23) at Object.next (C:\Users\ARVIND OJHA.twilio-cli\node_modules\flex-plugin-scripts\dist\scripts\pre-script-check.js:14:53) at C:\Users\ARVIND OJHA.twilio-cli\node_modules\flex-plugin-scripts\dist\scripts\pre-script-check.js:8:71 at new Promise ()

Versions

package version
flex-plugin 4.0.0
node 14.16.0
npm 6.14.11
'twilio-cli' '2.24.0'

Steps to Reproduce

Please provide the steps to reproduce this bug:

1 twilio login 2. twilio flex:plugins:create plugin-yourplgin --install 3. twilio flex:plugins:start

Expected Behavior

A clear and concise description of what you expected to happen.

https://github.com/twilio/flex-plugin-builder/issues"

oarvindjha avatar May 24 '21 10:05 oarvindjha

@oarvindjha , what type of terminal are you using on your Windows machine?

rnairtwilio avatar May 24 '21 16:05 rnairtwilio

@oarvindjha please also paste the content of C:\Users\ARVIND OJHA.twilio-cli\flex\plugins.json - it looks like there is some issue with that file.

ktalebian avatar May 24 '21 17:05 ktalebian

I am using window 10 command prompt to run the command

plugins.json file is blank, many time i have removed the whole twilio-cli folder and installed it again, but getting same issue

oarvindjha avatar May 25 '21 12:05 oarvindjha

@oarvindjha can you try adding an empty object in that file instead of deleting it, i.e. make sure the content of C:\Users\ARVIND OJHA.twilio-cli\flex\plugins.json is {}

ktalebian avatar May 25 '21 14:05 ktalebian

@ktalebian Thanks for your valuable input.

Now i am getting another issue while ran twilio flex:plugins:start

command run successfully with below message

「wds」: Project is running at http://localhost:3000// i 「wds」: webpack output is served from / i 「wds」: Content not from webpack is served from D:\Sirva\flex-plugins\plugin-qlab-data\public, C:\Users\ARVIND OJHA.twilio-cli\node_modules\flex-plugin-scripts\dev_assets i 「wds」: 404s will fallback to / Starting development server (static)...

internal/modules/cjs/loader.js:888 throw err; ^

Error: Cannot find module 'C:\Users\ARVIND' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15) at Function.Module._load (internal/modules/cjs/loader.js:730:27) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) at internal/main/run_main_module.js:17:47 { code: 'MODULE_NOT_FOUND', requireStack: [] } Compiled successfully!

Your plugin app is running in the browser on:

    Local        http://localhost:3000/
    Network      http://192.168.43.8:3000/

Local Plugins:

    plugin-qlab-data      D:Sirvaflex-pluginsplugin-qlab-data

This is a development build and is not intended to be used for production. To create a production build, use:

     twilio flex:plugins:build

but when flex agent window opened in browser its giving below error

[HPM] Error occurred while trying to proxy request /plugins/plugin-qlab-data.js from localhost:3000 to http://localhost:3000 (EADDRNOTAVAIL) (https://nodejs.org/api/errors.html#errors_common_system_errors)

oarvindjha avatar May 27 '21 13:05 oarvindjha

Hi there, I found the same issue when start the flex plugin,

Error: Cannot find module 'C:\Users\FREDY'

My windows 10 folder is C:\Users\FREDY TWILIO, the problem might caused by space in folder?

Thanks..

cbn-ess-fredyf avatar Dec 21 '21 10:12 cbn-ess-fredyf

I'm running into the same issue on MacOS 12.4

package version
@twilio/plugin-flex 5.1.2
flex-plugin-scripts 14.19.1
node 8.8.0
npm 3.5.0

I saw there was #212 which was closed but didn't have any explanation

morficus avatar Jul 06 '22 03:07 morficus

Hi,

This is a long open item more than a year now, hence closing it. Feel free to reopen it if still required.

anjha91 avatar Oct 04 '23 08:10 anjha91