Element: [Bug Report] et compiled custom topic report error

Created on 4 Dec 2017  ·  13Comments  ·  Source: ElemeFE/element

Element UI version

1.4.12

OS/Browsers version

osx

Vue version

2.5.5

Reproduction Link

https://github.com/ElementUI/element-theme/issues

Steps to reproduce

这里没有重现步骤, 但是在element-theme 的github 那边已经出现了很多相同的 issue [见链接] 并没有跟进,安装的时候显示:

npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-f
s@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-f

s@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
  [email protected]
added 81 packages in 16.65s

然后我跑 et 命令

fs.js:909
  return binding.readdir(pathModule._makeLong(path), options.encoding);
                 ^

Error: ENOENT: no such file or directory, scandir '/usr/local/lib/node_modules/element-theme/node_modules/node-sass/vendor'
    at Object.fs.readdirSync (fs.js:909:18)
    at Object.getInstalledBinaries (/usr/local/lib/node_modules/element-theme/node_modules/node-sass/lib/extensions.js:128:13)
    at foundBinariesList (/usr/local/lib/node_modules/element-theme/node_modules/node-sass/lib/errors.js:20:15)

    at foundBinaries (/usr/local/lib/node_modules/element-theme/node_modules/node-sass/lib/errors.js:15:5)
    at Object.module.exports.missingBinary (/usr/local/lib/node_modules/element-theme/node_modules/node-sass/lib/errors.js:45:5)
    at module.exports (/usr/local/lib/node_modules/element-theme/node_modules/node-sass/lib/binding.js:15:30)
    at Object.<anonymous> (/usr/local/lib/node_modules/element-theme/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)

对于node-sass 也执行过了rebuild 命令, 但是并没有效果

What is Expected?

使得 et 工具可用

What is actually happening?

目前 是不可用的,虽然不影响 elementui core的使用

Most helpful comment

Translation of this issue:

Element UI version

1.4.12

OS/Browsers version

OSX

Vue version

2.5.5

Reproduction Link

https://github.com/ElementUI/element-theme/issues

Steps to reproduce

There are no steps to reproduce, but there are many similar issue on the GitHub of element-theme.

NPM WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to
NPM WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to

NPM WARN deprecated [email protected]: graceful-fs V3.0.0 and before will fail on node releases Please update to graceful-f > v7.0.
S@^4.0.0 as soon as possible. Use'npm LS graceful-fs'to find it

NPM WARN deprecated [email protected]: graceful-fs V3.0.0 and before will fail on node releases Please update to graceful-f > v7.0.
S@^4.0.0 as soon as possible. Use'npm LS graceful-fs'to find it

[email protected]
Added 81 packages in 16.65s

And then I run the ET command
S.js:909

Return binding.readdir (pathModule._makeLong (path), options.encoding);
^

Error: ENOENT: no such file or directory, scandir'/usr/local/lib/node_modules/element-theme/node_modules/node-sass/vendor'
At Object.fs.readdirSync (fs.js:909:18)

At Object.getInstalledBinaries (/usr/local/lib/node_modules/element-theme/node_modules/node-sass/lib/extensions.js:128:13)
At foundBinariesList (/usr/local/lib/node_modules/element-theme/node_modules/node-sass/lib/errors.js:20:15)

At foundBinaries (/usr/local/lib/node_modules/element-theme/node_modules/node-sass/lib/errors.js:15:5)
At Object.module.exports.missingBinary (/usr/local/lib/node_modules/element-theme/node_modules/node-sass/lib/errors.js:45:5)

At module.exports (/usr/local/lib/node_modules/element-theme/node_modules/node-sass/lib/binding.js:15:30)
At Object. (/usr/local/lib/node_modules/element-theme/node_modules/node-sass/lib/index.js:14:35)

At Module._compile (module.js:569:30)
At Object.Module._extensions..Js (module.js:580:10)

At Module.load (module.js:503:32)
The rebuild command has also been executed for node-sass, but it doesn't work

What is Expected?

Make the ET tool available

What is actually happening?

It is not available at the moment, although it does not affect the use of elementui core

All 13 comments

Translation of this issue:

Element UI version

1.4.12

OS/Browsers version

OSX

Vue version

2.5.5

Reproduction Link

https://github.com/ElementUI/element-theme/issues

Steps to reproduce

There are no steps to reproduce, but there are many similar issue on the GitHub of element-theme.

NPM WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to
NPM WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to

NPM WARN deprecated [email protected]: graceful-fs V3.0.0 and before will fail on node releases Please update to graceful-f > v7.0.
S@^4.0.0 as soon as possible. Use'npm LS graceful-fs'to find it

NPM WARN deprecated [email protected]: graceful-fs V3.0.0 and before will fail on node releases Please update to graceful-f > v7.0.
S@^4.0.0 as soon as possible. Use'npm LS graceful-fs'to find it

[email protected]
Added 81 packages in 16.65s

And then I run the ET command
S.js:909

Return binding.readdir (pathModule._makeLong (path), options.encoding);
^

Error: ENOENT: no such file or directory, scandir'/usr/local/lib/node_modules/element-theme/node_modules/node-sass/vendor'
At Object.fs.readdirSync (fs.js:909:18)

At Object.getInstalledBinaries (/usr/local/lib/node_modules/element-theme/node_modules/node-sass/lib/extensions.js:128:13)
At foundBinariesList (/usr/local/lib/node_modules/element-theme/node_modules/node-sass/lib/errors.js:20:15)

At foundBinaries (/usr/local/lib/node_modules/element-theme/node_modules/node-sass/lib/errors.js:15:5)
At Object.module.exports.missingBinary (/usr/local/lib/node_modules/element-theme/node_modules/node-sass/lib/errors.js:45:5)

At module.exports (/usr/local/lib/node_modules/element-theme/node_modules/node-sass/lib/binding.js:15:30)
At Object. (/usr/local/lib/node_modules/element-theme/node_modules/node-sass/lib/index.js:14:35)

At Module._compile (module.js:569:30)
At Object.Module._extensions..Js (module.js:580:10)

At Module.load (module.js:503:32)
The rebuild command has also been executed for node-sass, but it doesn't work

What is Expected?

Make the ET tool available

What is actually happening?

It is not available at the moment, although it does not affect the use of elementui core

那边的 issue 反映的不是这个问题。我本地试了一下,没有重现成功。能否提供更多信息?比如 element-theme 的版本,是全局安装还是在项目内安装,以及 element-theme-chalk 的版本。

@Leopoldthecoder

  "element-theme-chalk": "^2.0.7",
  "element-theme-default": "^1.4.12"
  "element-theme": "^2.0.1",

我是在全局进行安装的, 然后出现了这个问题,如下的链接和我反馈的问题类似,之前使用的好好的,然后看到 1.4.12 之后不再维护了, 所以想要升级到新的, 然后删除了本地的 `node_modules目录进行重新安装, 然后忘记了之前曾经安装过主题工具, 就重新进行了安装, 才出现了这个问题, 目前无法进行变量文件初始化, 也就回滚到 之前的elementUI` 了

链接
链接

好吧,这俩链接和我的不一样

我尝试重新安装

sudo npm uninstall -g element-theme
sudo npm install -g element-theme

然后是

npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-f
s@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-f
s@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
/Users/phyand/.npm-global/bin/et -> /Users/phyand/.npm-global/lib/node_modules/element-theme/bin/element-theme
/Users/phyand/.npm-global/bin/element-theme -> /Users/phyand/.npm-global/lib/node_modules/element-theme/bin/element-theme

> [email protected] install /Users/phyand/.npm-global/lib/node_modules/element-theme/node_modules/node-sass
> node scripts/install.js

Unable to save binary /Users/phyand/.npm-global/lib/node_modules/element-theme/node_modules/node-sass/vendor/darwin-x64-57 : { Error
: EACCES: permission denied, mkdir '/Users/phyand/.npm-global/lib/node_modules/element-theme/node_modules/node-sass/vendor'
    at Object.fs.mkdirSync (fs.js:890:18)
    at sync (/Users/phyand/.npm-global/lib/node_modules/element-theme/node_modules/mkdirp/index.js:71:13)
    at Function.sync (/Users/phyand/.npm-global/lib/node_modules/element-theme/node_modules/mkdirp/index.js:77:24)
    at checkAndDownloadBinary (/Users/phyand/.npm-global/lib/node_modules/element-theme/node_modules/node-sass/scripts/install.js:11
1:11)
    at Object.<anonymous> (/Users/phyand/.npm-global/lib/node_modules/element-theme/node_modules/node-sass/scripts/install.js:154:1)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
at Function.Module._load (module.js:458:3)
  errno: -13,
  code: 'EACCES',
  syscall: 'mkdir',
  path: '/Users/phyand/.npm-global/lib/node_modules/element-theme/node_modules/node-sass/vendor' }

> [email protected] postinstall /Users/phyand/.npm-global/lib/node_modules/element-theme/node_modules/node-sass
> node scripts/build.js


Building: /usr/local/bin/node /Users/phyand/.npm-global/lib/node_modules/element-theme/node_modules/node-gyp/bin/node-gyp.js rebuild
 --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/local/bin/node',
gyp verb cli   '/Users/phyand/.npm-global/lib/node_modules/element-theme/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library=' ]
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH

@Leopoldthecoder 我这里解决了这个问题, 首先将 npm 的默认地址进行更改, 我将 项目本地 的 node-sass 放到 npm 全局目录下,并将原先.npm 下的包移动到新的目录下 ,然后新建了 vendor 目录 , 并执行 rebuild, 然后就可以了, 已经顺利迁移到 element-ui 2.0.7了,谢谢帮忙!!

@wonderFF 还有其他的解决办法吗?我也遇到了这个问题

@BusyHe 这个我也没有什么好的解决办法, 反正一通操作, 搞好了, 自己也没有意识到发生了什么

@wonderFF 我退回到v0.2.0版本了。就没报错了

要不考虑一下将全局的 node_modules 替换一下

@wonderFF 替换成什么?如果新的环境部署的时候是不是还要再替换,这个不是个可靠的解决方案

可以将 element-theme-chalk 安装到项目依赖, 不要全局安装, 我的处理经验也不是很多, 可以 @Leopoldthecoder 大腿帮帮忙

Was this page helpful?
0 / 5 - 0 ratings