AWolf81 / snowpack-plugin-web-ext

Snowpack for web-ext to generate Web extensions.
MIT License
3 stars 2 forks source link

Getting this error while running npm start #5

Closed j23saw closed 3 years ago

j23saw commented 3 years ago
TypeError: Cannot read property 'env' of undefined
    at Object.config (D:\projects\partyfy\partyfy-ex\node_modules\snowpack-plugin-web-ext\dist-src\index.js:51:60)
    at D:\projects\partyfy\partyfy-ex\node_modules\snowpack\lib\index.js:70931:20
    at Array.forEach (<anonymous>)
    at normalizeConfig (D:\projects\partyfy\partyfy-ex\node_modules\snowpack\lib\index.js:70929:13)
    at createConfiguration (D:\projects\partyfy\partyfy-ex\node_modules\snowpack\lib\index.js:71143:30)
    at Object.loadConfiguration (D:\projects\partyfy\partyfy-ex\node_modules\snowpack\lib\index.js:71214:16)
    at cli (D:\projects\partyfy\partyfy-ex\node_modules\snowpack\lib\index.js:132300:35)
    at Object.<anonymous> (D:\projects\partyfy\partyfy-ex\node_modules\snowpack\index.bin.js:14:1)
    at Module._compile (internal/modules/cjs/loader.js:1156:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
    at Module.load (internal/modules/cjs/loader.js:1000:32)
    at Function.Module._load (internal/modules/cjs/loader.js:899:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
    at internal/main/run_main_module.js:18:47

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ start: `cross-env NODE_ENV=develop snowpack build --watch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\JAYESH\AppData\Roaming\npm-cache\_logs\2021-01-17T19_22_17_076Z-debug.log
AWolf81 commented 3 years ago

Do you have a link to your repo where this issue occurs? Without seeing your code it's difficult to say what's wrong.

But it looks like you are using env in your run_main_module.js file and that is undefined.

AWolf81 commented 3 years ago

This issue with env happens because the plugin is written for Snowpack v2.x API. I need to make the plugin compatible with v3.x. I'll create a new issue for it.

There are still things that are not working with v3.x.