Description
My project is contained within a monorepo; the extension requires a library shared by a frontend component and the Extension itself.
When I try to run vsce package
, I get the following output:
npm ERR! missing: @types/[email protected], required by [email protected]
npm ERR! missing: [email protected], required by [email protected]
npm ERR! extraneous: @types/[email protected] C:\projects\edge-devtools-network-console\packages\network-console-vscode-extension\node_modules\network-console-shared\node_modules\@types\hash-sum
npm ERR! extraneous: @types/[email protected] C:\projects\edge-devtools-network-console\packages\network-console-vscode-extension\node_modules\network-console-shared\node_modules\@types\mocha
npm ERR! extraneous: [email protected] C:\projects\edge-devtools-network-console\packages\network-console-vscode-extension\node_modules\network-console-shared\node_modules\dts-bundle-webpack
npm ERR! extraneous: [email protected] C:\projects\edge-devtools-network-console\packages\network-console-vscode-extension\node_modules\network-console-shared\node_modules\mocha
npm ERR! extraneous: [email protected] C:\projects\edge-devtools-network-console\packages\network-console-vscode-extension\node_modules\network-console-shared\node_modules\ts-loader
npm ERR! extraneous: [email protected] C:\projects\edge-devtools-network-console\packages\network-console-vscode-extension\node_modules\network-console-shared\node_modules\tslint
npm ERR! extraneous: [email protected] C:\projects\edge-devtools-network-console\packages\network-console-vscode-extension\node_modules\network-console-shared\node_modules\typescript
npm ERR! extraneous: [email protected] C:\projects\edge-devtools-network-console\packages\network-console-vscode-extension\node_modules\network-console-shared\node_modules\webpack
npm ERR! extraneous: [email protected] C:\projects\edge-devtools-network-console\packages\network-console-vscode-extension\node_modules\network-console-shared\node_modules\webpack-cli
The commit hash is here: robpaveza/edge-devtools-network-console@85733dc
To repro from a clean repo, here's what I did:
tmp>git clone https://github.com/robpaveza/edge-devtools-network-console.git
tmp>cd edge-devtools-network-console
tmp\edge-devtools-network-console>npm i
tmp\edge-devtools-network-console>set SKIP_PREFLIGHT_CHECK=true
tmp\edge-devtools-network-console>npm run install-and-build
tmp\edge-devtools-network-console>cd packages\network-console-vscode-extension
tmp\edge-devtools-network-console\packages\network-console-vscode-extension>mklink .\frontend ..\devtools-network-console\build
tmp\edge-devtools-network-console\packages\network-console-vscode-extension>npm i
tmp\edge-devtools-network-console\packages\network-console-vscode-extension>vsce package # repro's here
To outline what goes on here: the first npm i
installs the top-level script dependencies. SKIP_PREFLIGHT_CHECK is required to avoid a build problem with a create-react-app script conflict in devtools-network-frontend. npm run install-and-build
then runs npm install
in both network-console-shared
and devtools-network-console
, and compiles them. Finally, we create a symbolic link from the devtools-network-console
project's build
folder, runs npm i
, then tries to run the package command.