Open-CSP / WikiSearchFront

Front-end for the WikiSearch extension.
GNU General Public License v2.0
3 stars 6 forks source link

Need help on how to build... #20

Closed bertrandgorge closed 3 months ago

bertrandgorge commented 3 months ago

Hello, this is not a bug but more a request for help...! I try a few changes on the app, and I therefore need to build everything. I use the following commands to do so...

bertrand@Fixe-Bertrand:~/3perf-mw1.39/html/extensions/WikiSearchFront$ npm install
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN old lockfile vue-loader-v16: No matching version found for vue-loader-v16@16.8.3.
npm WARN old lockfile     at module.exports (/usr/local/lib/node_modules/npm/node_modules/npm-pick-manifest/lib/index.js:209:23)
npm WARN old lockfile     at RegistryFetcher.manifest (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/registry.js:130:22)
npm WARN old lockfile     at async /usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:734:24
npm WARN old lockfile  Could not fetch metadata for vue-loader-v16@16.8.3 vue-loader-v16: No matching version found for vue-loader-v16@16.8.3.
npm WARN old lockfile     at module.exports (/usr/local/lib/node_modules/npm/node_modules/npm-pick-manifest/lib/index.js:209:23)
npm WARN old lockfile     at RegistryFetcher.manifest (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/registry.js:130:22)
npm WARN old lockfile     at async /usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:734:24 {
npm WARN old lockfile   code: 'ETARGET',
npm WARN old lockfile   type: 'version',
npm WARN old lockfile   wanted: '16.8.3',
npm WARN old lockfile   versions: [
npm WARN old lockfile     '16.0.0-beta.5',
npm WARN old lockfile     '16.0.0-beta.5.1',
npm WARN old lockfile     '16.0.0-beta.5.2',
npm WARN old lockfile     '16.0.0-beta.5.3',
npm WARN old lockfile     '16.0.0-beta.5.4'
npm WARN old lockfile   ],
npm WARN old lockfile   distTags: { latest: '16.0.0-beta.5.4' },
npm WARN old lockfile   defaultTag: 'latest'
npm WARN old lockfile }
npm WARN deprecated is-data-descriptor@0.1.4: Please upgrade to v0.1.5
npm WARN deprecated is-data-descriptor@0.1.4: Please upgrade to v0.1.5
npm WARN deprecated is-accessor-descriptor@0.1.6: Please upgrade to v0.1.7
npm WARN deprecated is-data-descriptor@0.1.4: Please upgrade to v0.1.5
npm WARN deprecated is-accessor-descriptor@0.1.6: Please upgrade to v0.1.7
npm WARN deprecated is-accessor-descriptor@0.1.6: Please upgrade to v0.1.7
npm WARN deprecated is-data-descriptor@0.1.4: Please upgrade to v0.1.5
npm WARN deprecated is-accessor-descriptor@0.1.6: Please upgrade to v0.1.7
npm WARN deprecated is-accessor-descriptor@0.1.6: Please upgrade to v0.1.7
npm WARN deprecated is-data-descriptor@0.1.4: Please upgrade to v0.1.5
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated is-data-descriptor@1.0.0: Please upgrade to v1.0.1
npm WARN deprecated is-accessor-descriptor@1.0.0: Please upgrade to v1.0.1
npm WARN deprecated @babel/plugin-proposal-unicode-property-regex@7.16.7: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-unicode-property-regex instead.
npm WARN deprecated @babel/plugin-proposal-private-property-in-object@7.16.7: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-property-in-object instead.
npm WARN deprecated @babel/plugin-proposal-private-methods@7.16.11: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-methods instead.
npm WARN deprecated @babel/plugin-proposal-numeric-separator@7.16.7: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead.
npm WARN deprecated @babel/plugin-proposal-export-namespace-from@7.16.7: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-export-namespace-from instead.
npm WARN deprecated @babel/plugin-proposal-class-properties@7.16.7: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.
npm WARN deprecated @babel/plugin-proposal-dynamic-import@7.16.7: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-dynamic-import instead.
npm WARN deprecated @babel/plugin-proposal-class-static-block@7.16.7: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-static-block instead.
npm WARN deprecated @babel/plugin-proposal-optional-catch-binding@7.16.7: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-catch-binding instead.
npm WARN deprecated @babel/plugin-proposal-logical-assignment-operators@7.16.7: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-logical-assignment-operators instead.
npm WARN deprecated @babel/plugin-proposal-nullish-coalescing-operator@7.16.7: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.
npm WARN deprecated @babel/plugin-proposal-json-strings@7.16.7: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-json-strings instead.
npm WARN deprecated @babel/plugin-proposal-async-generator-functions@7.16.8: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-async-generator-functions instead.
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated @babel/plugin-proposal-optional-chaining@7.16.7: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.
npm WARN deprecated apollo-datasource@0.9.0: The `apollo-datasource` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated apollo-tracing@0.15.0: The `apollo-tracing` package is no longer part of Apollo Server 3. See https://www.apollographql.com/docs/apollo-server/migration/#tracing for details
npm WARN deprecated @babel/plugin-proposal-object-rest-spread@7.16.7: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead.
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated apollo-server-plugin-base@0.13.0: The `apollo-server-plugin-base` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated apollo-server-types@0.9.0: The `apollo-server-types` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated graphql-extensions@0.15.0: The `graphql-extensions` API has been removed from Apollo Server 3. Use the plugin API instead: https://www.apollographql.com/docs/apollo-server/integrations/plugins/
npm WARN deprecated apollo-server-errors@2.5.0: The `apollo-server-errors` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated shortid@2.2.16: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated apollo-cache-control@0.14.0: The functionality provided by the `apollo-cache-control` package is built in to `apollo-server-core` starting with Apollo Server 3. See https://www.apollographql.com/docs/apollo-server/migration/#cachecontrol for details.
npm WARN deprecated apollo-server-caching@0.7.0: This package is part of the legacy caching implementation used by Apollo Server v2 and v3, and is no longer maintained. We recommend you switch to the newer Keyv-based implementation (which is compatible with all versions of Apollo Server). See https://www.apollographql.com/docs/apollo-server/v3/performance/cache-backends#legacy-caching-implementation for more details.
npm WARN deprecated apollo-server-express@2.25.3: The `apollo-server-express` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated apollo-reporting-protobuf@0.8.0: The `apollo-reporting-protobuf` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/usage-reporting-protobuf` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated apollo-server-env@3.1.0: The `apollo-server-env` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/utils.fetcher` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated subscriptions-transport-ws@0.9.19: The `subscriptions-transport-ws` package is no longer maintained. We recommend you use `graphql-ws` instead. For help migrating Apollo software to `graphql-ws`, see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws    For general help using `graphql-ws`, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md
npm WARN deprecated graphql-tools@4.0.8: This package has been deprecated and now it only exports makeExecutableSchema.
npm WARN deprecated And it will no longer receive updates.
npm WARN deprecated We recommend you to migrate to scoped packages such as @graphql-tools/schema, @graphql-tools/utils and etc.
npm WARN deprecated Check out https://www.graphql-tools.com to learn what package you should use instead
npm WARN deprecated apollo-server-core@2.25.3: The `apollo-server-core` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated vue@2.6.14: Vue 2 has reached EOL and is no longer actively maintained. See https://v2.vuejs.org/eol/ for more details.
npm WARN deprecated core-js-pure@3.21.1: core-js-pure@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js-pure.

added 973 packages, and audited 974 packages in 17s

82 packages are looking for funding
  run `npm fund` for details

26 vulnerabilities (6 moderate, 17 high, 3 critical)

To address issues that do not require attention, run:
  npm audit fix

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.
bertrand@Fixe-Bertrand:~/3perf-mw1.39/html/extensions/WikiSearchFront$ npm run build

> wikisearchfront@0.1.0 build
> vue-cli-service build

 ERROR  Error: Cannot find module '@vue/cli-plugin-babel/preset'
        Require stack:
        - /usr/local/lib/node_modules/@vue/cli-plugin-babel/node_modules/@babel/core/lib/config/files/plugins.js
        - /usr/local/lib/node_modules/@vue/cli-plugin-babel/node_modules/@babel/core/lib/config/files/index.js
        - /usr/local/lib/node_modules/@vue/cli-plugin-babel/node_modules/@babel/core/lib/index.js
        - /usr/local/lib/node_modules/@vue/cli-plugin-babel/index.js
        - /usr/local/lib/node_modules/@vue/cli-service/lib/Service.js
        - /usr/local/lib/node_modules/@vue/cli-service/bin/vue-cli-service.js

        Make sure that all the Babel plugins and presets you are using
        are defined as dependencies or devDependencies in your package.json
        file. It's possible that the missing plugin is loaded by a preset
        you are using that forgot to add the plugin to its dependencies: you
        can workaround this problem by explicitly adding the missing package
        to your top-level package.json.

Error: Cannot find module '@vue/cli-plugin-babel/preset'
Require stack:
- /usr/local/lib/node_modules/@vue/cli-plugin-babel/node_modules/@babel/core/lib/config/files/plugins.js
- /usr/local/lib/node_modules/@vue/cli-plugin-babel/node_modules/@babel/core/lib/config/files/index.js
- /usr/local/lib/node_modules/@vue/cli-plugin-babel/node_modules/@babel/core/lib/index.js
- /usr/local/lib/node_modules/@vue/cli-plugin-babel/index.js
- /usr/local/lib/node_modules/@vue/cli-service/lib/Service.js
- /usr/local/lib/node_modules/@vue/cli-service/bin/vue-cli-service.js

Make sure that all the Babel plugins and presets you are using
are defined as dependencies or devDependencies in your package.json
file. It's possible that the missing plugin is loaded by a preset
you are using that forgot to add the plugin to its dependencies: you
can workaround this problem by explicitly adding the missing package
to your top-level package.json.

    at Module._resolveFilename (node:internal/modules/cjs/loader:1149:15)
    at resolve (node:internal/modules/helpers:187:19)
    at tryRequireResolve (/usr/local/lib/node_modules/@vue/cli-plugin-babel/node_modules/@babel/core/lib/config/files/plugins.js:121:11)
    at resolveStandardizedNameForRequire (/usr/local/lib/node_modules/@vue/cli-plugin-babel/node_modules/@babel/core/lib/config/files/plugins.js:155:19)
    at resolveStandardizedName (/usr/local/lib/node_modules/@vue/cli-plugin-babel/node_modules/@babel/core/lib/config/files/plugins.js:170:12)
    at loadPreset (/usr/local/lib/node_modules/@vue/cli-plugin-babel/node_modules/@babel/core/lib/config/files/plugins.js:61:20)
    at loadPreset.next (<anonymous>)
    at createDescriptor (/usr/local/lib/node_modules/@vue/cli-plugin-babel/node_modules/@babel/core/lib/config/config-descriptors.js:140:16)
    at createDescriptor.next (<anonymous>)
    at evaluateSync (/usr/local/lib/node_modules/@vue/cli-plugin-babel/node_modules/gensync/index.js:251:28)
    at /usr/local/lib/node_modules/@vue/cli-plugin-babel/node_modules/gensync/index.js:31:34
    at Array.map (<anonymous>)
    at Function.sync (/usr/local/lib/node_modules/@vue/cli-plugin-babel/node_modules/gensync/index.js:31:22)
    at Function.all (/usr/local/lib/node_modules/@vue/cli-plugin-babel/node_modules/gensync/index.js:210:24)
    at Generator.next (<anonymous>)
    at createDescriptors (/usr/local/lib/node_modules/@vue/cli-plugin-babel/node_modules/@babel/core/lib/config/config-descriptors.js:102:41)
    at createDescriptors.next (<anonymous>)
    at createPresetDescriptors (/usr/local/lib/node_modules/@vue/cli-plugin-babel/node_modules/@babel/core/lib/config/config-descriptors.js:96:17)
    at createPresetDescriptors.next (<anonymous>)
    at /usr/local/lib/node_modules/@vue/cli-plugin-babel/node_modules/@babel/core/lib/gensync-utils/functional.js:22:27
    at Generator.next (<anonymous>)
    at mergeChainOpts (/usr/local/lib/node_modules/@vue/cli-plugin-babel/node_modules/@babel/core/lib/config/config-chain.js:350:34)
    at mergeChainOpts.next (<anonymous>)
    at chainWalker (/usr/local/lib/node_modules/@vue/cli-plugin-babel/node_modules/@babel/core/lib/config/config-chain.js:316:14)
    at chainWalker.next (<anonymous>)
    at loadFileChain (/usr/local/lib/node_modules/@vue/cli-plugin-babel/node_modules/@babel/core/lib/config/config-chain.js:191:24)
    at loadFileChain.next (<anonymous>)
    at buildRootChain (/usr/local/lib/node_modules/@vue/cli-plugin-babel/node_modules/@babel/core/lib/config/config-chain.js:77:27)
    at buildRootChain.next (<anonymous>)
    at loadPrivatePartialConfig (/usr/local/lib/node_modules/@vue/cli-plugin-babel/node_modules/@babel/core/lib/config/partial.js:72:62)
    at loadPrivatePartialConfig.next (<anonymous>)
    at loadPartialConfig (/usr/local/lib/node_modules/@vue/cli-plugin-babel/node_modules/@babel/core/lib/config/partial.js:115:25)
    at loadPartialConfig.next (<anonymous>)
    at evaluateSync (/usr/local/lib/node_modules/@vue/cli-plugin-babel/node_modules/gensync/index.js:251:28)
    at sync (/usr/local/lib/node_modules/@vue/cli-plugin-babel/node_modules/gensync/index.js:89:14)
    at stopHiding - secret - don't use this - v1 (/usr/local/lib/node_modules/@vue/cli-plugin-babel/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:47:12)
    at Object.loadPartialConfigSync (/usr/local/lib/node_modules/@vue/cli-plugin-babel/node_modules/@babel/core/lib/config/index.js:37:84)
    at module.exports (/usr/local/lib/node_modules/@vue/cli-plugin-babel/index.js:31:9)
    at /usr/local/lib/node_modules/@vue/cli-service/lib/Service.js:82:9
    at Array.forEach (<anonymous>)
    at loadedCallback (/usr/local/lib/node_modules/@vue/cli-service/lib/Service.js:80:20)
    at Service.init (/usr/local/lib/node_modules/@vue/cli-service/lib/Service.js:97:14)
    at Service.run (/usr/local/lib/node_modules/@vue/cli-service/lib/Service.js:247:16)
    at Object.<anonymous> (/usr/local/lib/node_modules/@vue/cli-service/bin/vue-cli-service.js:37:9)
    at Module._compile (node:internal/modules/cjs/loader:1378:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1437:10)
    at Module.load (node:internal/modules/cjs/loader:1212:32)
    at Module._load (node:internal/modules/cjs/loader:1028:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:142:12)
    at node:internal/main/run_main_module:28:49

I've tried many things to fix those, but not sure where to go, as not being an expert of vue... Any help would be greatly appreciated!

bertrandgorge commented 3 months ago

I was able to go further.

When you do that, npm install and npm run build finally work. It doesn't produce the right files though... I tried to go through vue ui and build using the defined tasks but I still don't get what is in the dist folder - I must be missing something!!!

bertrandgorge commented 3 months ago

Ok - got it finally - the build script in package.json needs to read:

    "build": "vue-cli-service build --mode production --target lib --name wikisearchfront",
robis24 commented 3 months ago

wikisearchfront needs an update to vue3 soon,

happy to see that you figured out how to create a build running npm run lib was also an option

"lib": " npx vue-cli-service build --target lib",
bertrandgorge commented 3 months ago

Thanks ! I also got an issue with : Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:68:19)

The fix apparently is to downgrade node to LTS 16.20.0:

sudo npm install -g n
sudo n 16.20.0