Code Monkey home page Code Monkey logo

Comments (11)

dlzmoe avatar dlzmoe commented on June 22, 2024

可以的,clone源码到本地,重新构建就可以了

yarn
yarn build

from picx.

Febtw avatar Febtw commented on June 22, 2024

可以的,clone源码到本地,重新构建就可以了

yarn
yarn build

无法解析 @intlify/shared 包的入口文件
root@933a62df7f4b:/Compiler_src/picx# yarn build
yarn run v1.22.19
$ vite build
vite v2.7.13 building for production...
✓ 27 modules transformed.
[vite-plugin-pwa:build] Failed to resolve entry for package "@intlify/shared". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." entry in "@intlify/shared" package
error during build:
Error: Failed to resolve entry for package "@intlify/shared". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." entry in "@intlify/shared" package
at packageEntryFailure (/Compiler_src/picx/node_modules/vite/dist/node/chunks/dep-f5552faa.js:30629:11)
at resolvePackageEntry (/Compiler_src/picx/node_modules/vite/dist/node/chunks/dep-f5552faa.js:30625:9)
at tryNodeResolve (/Compiler_src/picx/node_modules/vite/dist/node/chunks/dep-f5552faa.js:30440:20)
at Object.resolveId (/Compiler_src/picx/node_modules/vite/dist/node/chunks/dep-f5552faa.js:30257:28)
at /Compiler_src/picx/node_modules/rollup/dist/shared/rollup.js:22879:40
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

from picx.

dlzmoe avatar dlzmoe commented on June 22, 2024

可以的,clone源码到本地,重新构建就可以了

yarn
yarn build

无法解析 @intlify/shared 包的入口文件 root@933a62df7f4b:/Compiler_src/picx# yarn build yarn run v1.22.19 $ vite build vite v2.7.13 building for production... ✓ 27 modules transformed. [vite-plugin-pwa:build] Failed to resolve entry for package "@intlify/shared". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." entry in "@intlify/shared" package error during build: Error: Failed to resolve entry for package "@intlify/shared". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." entry in "@intlify/shared" package at packageEntryFailure (/Compiler_src/picx/node_modules/vite/dist/node/chunks/dep-f5552faa.js:30629:11) at resolvePackageEntry (/Compiler_src/picx/node_modules/vite/dist/node/chunks/dep-f5552faa.js:30625:9) at tryNodeResolve (/Compiler_src/picx/node_modules/vite/dist/node/chunks/dep-f5552faa.js:30440:20) at Object.resolveId (/Compiler_src/picx/node_modules/vite/dist/node/chunks/dep-f5552faa.js:30257:28) at /Compiler_src/picx/node_modules/rollup/dist/shared/rollup.js:22879:40 error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

切npm试试看

from picx.

Febtw avatar Febtw commented on June 22, 2024

可以的,clone源码到本地,重新构建就可以了

yarn
yarn build

无法解析 @intlify/shared 包的入口文件 root@933a62df7f4b:/Compiler_src/picx# yarn build yarn run v1.22.19 $ vite build vite v2.7.13 building for production... ✓ 27 modules transformed. [vite-plugin-pwa:build] Failed to resolve entry for package "@intlify/shared". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." entry in "@intlify/shared" package error during build: Error: Failed to resolve entry for package "@intlify/shared". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." entry in "@intlify/shared" package at packageEntryFailure (/Compiler_src/picx/node_modules/vite/dist/node/chunks/dep-f5552faa.js:30629:11) at resolvePackageEntry (/Compiler_src/picx/node_modules/vite/dist/node/chunks/dep-f5552faa.js:30625:9) at tryNodeResolve (/Compiler_src/picx/node_modules/vite/dist/node/chunks/dep-f5552faa.js:30440:20) at Object.resolveId (/Compiler_src/picx/node_modules/vite/dist/node/chunks/dep-f5552faa.js:30257:28) at /Compiler_src/picx/node_modules/rollup/dist/shared/rollup.js:22879:40 error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

切npm试试看

好快的回复速度...

也是一样的问题,我先是
npm install
npm run build
构建不通过,才来翻issue的

root@933a62df7f4b:/Compiler_src/picx# npm install
npm WARN deprecated @types/[email protected]: This is a stub types definition. vfile-message provides its own type definitions, so you do not need this installed.
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: Use String.prototype.trim() instead
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead
npm WARN deprecated [email protected]: [email protected]

> [email protected] prepare
> husky install

husky - Git hooks installed

added 1245 packages, and audited 1246 packages in 57s

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

18 vulnerabilities (5 moderate, 13 high)

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
root@933a62df7f4b:/Compiler_src/picx# npm run build

> [email protected] build
> vite build

vite v2.7.13 building for production...
✓ 27 modules transformed.
[vite-plugin-pwa:build] Failed to resolve entry for package "@intlify/shared". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." entry in "@intlify/shared" package
error during build:
Error: Failed to resolve entry for package "@intlify/shared". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." entry in "@intlify/shared" package
    at packageEntryFailure (/Compiler_src/picx/node_modules/vite/dist/node/chunks/dep-f5552faa.js:30629:11)
    at resolvePackageEntry (/Compiler_src/picx/node_modules/vite/dist/node/chunks/dep-f5552faa.js:30625:9)
    at tryNodeResolve (/Compiler_src/picx/node_modules/vite/dist/node/chunks/dep-f5552faa.js:30440:20)
    at Object.resolveId (/Compiler_src/picx/node_modules/vite/dist/node/chunks/dep-f5552faa.js:30257:28)
    at /Compiler_src/picx/node_modules/rollup/dist/shared/rollup.js:22879:40

冒昧问一下你的构建环境?

from picx.

dlzmoe avatar dlzmoe commented on June 22, 2024

@Febtw

考虑切换一下版本,我是 14.15.0 成功的

from picx.

Febtw avatar Febtw commented on June 22, 2024

@zishume 好的,我再试试

from picx.

Febtw avatar Febtw commented on June 22, 2024

@zishume

node 14.17.6报错

yarn
error [email protected]: The engine "node" is incompatible with this module. Expected version ">= 16". Got "14.17.6"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

node 14.5.0 报错

yarn
error [email protected]: The engine "node" is incompatible with this module. Expected version ">= 16". Got "14.5.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command

node 16.0.0 报错

yarn
error [email protected]: The engine "node" is incompatible with this module. Expected version "^14.17.0 || ^16.13.0 || >=18.0.0". Got "16.0.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

node 16.13.0 报错
node 18.0.0 报错
与之前相同

root@510edfb925a0:/picx# yarn build
yarn run v1.22.18
$ vite build
vite v2.7.13 building for production...
✓ 27 modules transformed.
[vite-plugin-pwa:build] Failed to resolve entry for package "@intlify/shared". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." entry in "@intlify/shared" package
error during build:
Error: Failed to resolve entry for package "@intlify/shared". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." entry in "@intlify/shared" package
    at packageEntryFailure (/picx/node_modules/vite/dist/node/chunks/dep-f5552faa.js:30629:11)
    at resolvePackageEntry (/picx/node_modules/vite/dist/node/chunks/dep-f5552faa.js:30625:9)
    at tryNodeResolve (/picx/node_modules/vite/dist/node/chunks/dep-f5552faa.js:30440:20)
    at Object.resolveId (/picx/node_modules/vite/dist/node/chunks/dep-f5552faa.js:30257:28)
    at /picx/node_modules/rollup/dist/shared/rollup.js:22879:40
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

from picx.

Febtw avatar Febtw commented on June 22, 2024

@Biw315 @zishume
我用 yarn 和 npm install 都不能构建,看到 pnpm-lock.yaml 文件,查了一下换成 pnpm就可以了

可用 docker 环境

docker run -d --rm --name node-compiler -v ~/Compiler_dir:/Compiler_dir node tail -f /dev/null
docker exec -it node-compiler /bin/bash

##容器中
cd Compiler_dir
git clone https://github.com/XPoet/picx.git
cd picx
npm install -g pnpm
pnpm install
pnpm run build

取用 picx/dist 目录

from picx.

dlzmoe avatar dlzmoe commented on June 22, 2024

@Febtw @Biw315
image
这是我的环境,不清楚你们咋不成功...emmm

from picx.

Febtw avatar Febtw commented on June 22, 2024

@zishume
win下没尝试
依赖版本是用 pnpm-lock.yaml 锁定的,
vue-i18n和write-file-atomic的错误是在npm或yarn时跳版本了,和项目要求的版本不对应,可能你的外部依赖库刚好能满足

from picx.

XPoet avatar XPoet commented on June 22, 2024

PicX 不建议自己额外部署,其本身在一直迭代维护中,直接使用作者提供的 picx.xpoet.cn 就好,能为你减少很多不必要的麻烦。

from picx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.