hoppscotch / hoppscotch-extension

🧩 Browser extensions to provide more capabilities to https://hoppscotch.io
https://hoppscotch.io
MIT License
254 stars 95 forks source link

fail to `npm run build` #15

Closed linuxgg closed 3 years ago

linuxgg commented 3 years ago


> hoppscotch-extension@0.17.0 build /Users/tomlucky/tools/hoppscotch/hoppscotch-extension
> npx parcel build src/* --out-dir dist/ && npx copyfiles manifest.json dist && npx copyfiles icons/* dist

⚠️  Parser "assets/JSAsset" failed to initialize when processing asset "src/hookContent.js". Threw the following error:
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main resolved in /Users/tomlucky/tools/hoppscotch/hoppscotch-extension/node_modules/@babel/helper-compilation-targets/package.json
    at applyExports (internal/modules/cjs/loader.js:490:9)
    at resolveExports (internal/modules/cjs/loader.js:506:23)
    at Function.Module._findPath (internal/modules/cjs/loader.js:634:31)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:952:27)
    at Function.Module._load (internal/modules/cjs/loader.js:841:27)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (/Users/tomlucky/tools/hoppscotch/hoppscotch-extension/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at Object.<anonymous> (/Users/tomlucky/tools/hoppscotch/hoppscotch-extension/node_modules/@babel/preset-env/lib/debug.js:8:33)
    at Module._compile (/Users/tomlucky/tools/hoppscotch/hoppscotch-extension/node_modules/v8-compile-cache/v8-compile-cache.js:194:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10) falling back to RawAsset
🚨  Cannot read property 'length' of undefined
    at lineCounter (/Users/tomlucky/tools/hoppscotch/hoppscotch-extension/node_modules/parcel-bundler/src/utils/lineCounter.js:3:30)
    at JSPackager.writeModule (/Users/tomlucky/tools/hoppscotch/hoppscotch-extension/node_modules/parcel-bundler/src/packagers/JSPackager.js:127:60)
    at async JSPackager.addAsset (/Users/tomlucky/tools/hoppscotch/hoppscotch-extension/node_modules/parcel-bundler/src/packagers/JSPackager.js:88:5)
    at async Bundle._addDeps (/Users/tomlucky/tools/hoppscotch/hoppscotch-extension/node_modules/parcel-bundler/src/Bundle.js:250:5)
    at async Bundle._package (/Users/tomlucky/tools/hoppscotch/hoppscotch-extension/node_modules/parcel-bundler/src/Bundle.js:219:7)
    at async Promise.all (index 0)
    at async Bundle.package (/Users/tomlucky/tools/hoppscotch/hoppscotch-extension/node_modules/parcel-bundler/src/Bundle.js:202:5)
    at async Promise.all (index 1)
    at async Bundle.package (/Users/tomlucky/tools/hoppscotch/hoppscotch-extension/node_modules/parcel-bundler/src/Bundle.js:202:5)
    at async Bundler.bundle (/Users/tomlucky/tools/hoppscotch/hoppscotch-extension/node_modules/parcel-bundler/src/Bundler.js:325:27)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hoppscotch-extension@0.17.0 build: `npx parcel build src/* --out-dir dist/ && npx copyfiles manifest.json dist && npx copyfiles icons/* dist`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the hoppscotch-extension@0.17.0 build 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!     /Users/tomlucky/.npm/_logs/2020-11-23T07_36_44_469Z-debug.log
 (master) ~/tools/hoppscotch/hoppscotch-extension $ ```
AndrewBastin commented 3 years ago

Umm, sorry, forgot about this 😅

Have you ran npm install ?