Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

我按照提示到npm run dev:weapp时提示缺少npm包@tarojs/plugin-sass,却一直不成功 #134

Closed
bboy-xp opened this issue Jun 16, 2018 · 3 comments

Comments

@bboy-xp
Copy link

bboy-xp commented Jun 16, 2018

npm run dev:weapp

myApp@1.0.0 dev:weapp C:\工作空间\jser\learn-taro\myApp
npm run build:weapp -- --watch

myApp@1.0.0 build:weapp C:\工作空间\jser\learn-taro\myApp
taro build --type weapp "--watch"

Taro v0.0.51

开始编译项目 myApp
编译 入口文件 src/app.js
拷贝 NPM文件 dist/npm/@tarojs/taro-weapp/dist/index.js
拷贝 NPM文件 dist/npm/@tarojs/taro-weapp/index.js
生成 入口配置 dist/app.json
生成 入口文件 dist/app.js
缺少npm包@tarojs/plugin-sass,开始安装...
Cannot download "https://r.cnpmjs.org/node-sass//v4.9.0/win32-x64-57_binding.node":

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.

  export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

  npm config set proxy http://example.com:8080

gyp info it worked if it ends with ok
gyp verb cli [ 'C:\Program Files\nodejs\node.exe',
gyp verb cli 'C:\工作空间\jser\learn-taro\myApp\node_modules\node-gyp\bin\node-gyp.j
s',
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 node-gyp@3.7.0
gyp info using node@8.11.1 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb download using dist-url https://r.cnpmjs.org/node
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb which failed Error: not found: python2
gyp verb which failed at getNotFoundError (C:\工作空间\jser\learn-taro\myApp\node_module
s\which\which.js:13:12)
gyp verb which failed at F (C:\工作空间\jser\learn-taro\myApp\node_modules\which\which.j
s:68:19)
gyp verb which failed at E (C:\工作空间\jser\learn-taro\myApp\node_modules\which\which.j
s:80:29)
gyp verb which failed at C:\工作空间\jser\learn-taro\myApp\node_modules\which\which.js:8
9:16
gyp verb which failed at C:\工作空间\jser\learn-taro\myApp\node_modules\isexe\index.js:4
2:5
gyp verb which failed at C:\工作空间\jser\learn-taro\myApp\node_modules\isexe\windows.js
:36:5
gyp verb which failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb which failed python2 { Error: not found: python2
gyp verb which failed at getNotFoundError (C:\工作空间\jser\learn-taro\myApp\node_module
s\which\which.js:13:12)
gyp verb which failed at F (C:\工作空间\jser\learn-taro\myApp\node_modules\which\which.j
s:68:19)
gyp verb which failed at E (C:\工作空间\jser\learn-taro\myApp\node_modules\which\which.j
s:80:29)
gyp verb which failed at C:\工作空间\jser\learn-taro\myApp\node_modules\which\which.js:8
9:16
gyp verb which failed at C:\工作空间\jser\learn-taro\myApp\node_modules\isexe\index.js:4
2:5
gyp verb which failed at C:\工作空间\jser\learn-taro\myApp\node_modules\isexe\windows.js
:36:5
gyp verb which failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb which failed stack: 'Error: not found: python2\n at getNotFoundError (C:\工作
空间\jser\learn-taro\myApp\node_modules\which\which.js:13:12)\n at F (C:\工作空间\j
ser\learn-taro\myApp\node_modules\which\which.js:68:19)\n at E (C:\工作空间\jser\le
arn-taro\myApp\node_modules\which\which.js:80:29)\n at C:\工作空间\jser\learn-taro\
myApp\node_modules\which\which.js:89:16\n at C:\工作空间\jser\learn-taro\myApp\node
_modules\isexe\index.js:42:5\n at C:\工作空间\jser\learn-taro\myApp\node_modules\is
exe\windows.js:36:5\n at FSReqWrap.oncomplete (fs.js:152:21)',
gyp verb which failed code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb which failed Error: not found: python
gyp verb which failed at getNotFoundError (C:\工作空间\jser\learn-taro\myApp\node_module
s\which\which.js:13:12)
gyp verb which failed at F (C:\工作空间\jser\learn-taro\myApp\node_modules\which\which.j
s:68:19)
gyp verb which failed at E (C:\工作空间\jser\learn-taro\myApp\node_modules\which\which.j
s:80:29)
gyp verb which failed at C:\工作空间\jser\learn-taro\myApp\node_modules\which\which.js:8
9:16
gyp verb which failed at C:\工作空间\jser\learn-taro\myApp\node_modules\isexe\index.js:4
2:5
gyp verb which failed at C:\工作空间\jser\learn-taro\myApp\node_modules\isexe\windows.js
:36:5
gyp verb which failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb which failed python { Error: not found: python
gyp verb which failed at getNotFoundError (C:\工作空间\jser\learn-taro\myApp\node_module
s\which\which.js:13:12)
gyp verb which failed at F (C:\工作空间\jser\learn-taro\myApp\node_modules\which\which.j
s:68:19)
gyp verb which failed at E (C:\工作空间\jser\learn-taro\myApp\node_modules\which\which.j
s:80:29)
gyp verb which failed at C:\工作空间\jser\learn-taro\myApp\node_modules\which\which.js:8
9:16
gyp verb which failed at C:\工作空间\jser\learn-taro\myApp\node_modules\isexe\index.js:4
2:5
gyp verb which failed at C:\工作空间\jser\learn-taro\myApp\node_modules\isexe\windows.js
:36:5
gyp verb which failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb which failed stack: 'Error: not found: python\n at getNotFoundError (C:\工作
空间\jser\learn-taro\myApp\node_modules\which\which.js:13:12)\n at F (C:\工作空间\j
ser\learn-taro\myApp\node_modules\which\which.js:68:19)\n at E (C:\工作空间\jser\le
arn-taro\myApp\node_modules\which\which.js:80:29)\n at C:\工作空间\jser\learn-taro\
myApp\node_modules\which\which.js:89:16\n at C:\工作空间\jser\learn-taro\myApp\node
_modules\isexe\index.js:42:5\n at C:\工作空间\jser\learn-taro\myApp\node_modules\is
exe\windows.js:36:5\n at FSReqWrap.oncomplete (fs.js:152:21)',
gyp verb which failed code: 'ENOENT' }
gyp verb could not find "python". checking python launcher
gyp verb could not find "python". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\工作空间\jser\learn-taro\myApp\node_module
s\node-gyp\lib\configure.js:492:19)
gyp ERR! stack at PythonFinder. (C:\工作空间\jser\learn-taro\myApp\node_modules
\node-gyp\lib\configure.js:517:16)
gyp ERR! stack at C:\工作空间\jser\learn-taro\myApp\node_modules\graceful-fs\polyfills.js:
284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\工作空间\jser\learn-taro\myApp
\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\工作空间\jser\learn-taro\myApp\node_modules\node-sass
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
Build failed with error code: 1
{ Error: Cannot find module '@tarojs/plugin-sass' from 'C:\工作空间\jser\learn-taro\myApp'
at C:\工作空间\jser\learn-taro\myApp\node_modules\resolve\lib\async.js:51:31
at processDirs (C:\工作空间\jser\learn-taro\myApp\node_modules\resolve\lib\async.js:185:39
)
at ondir (C:\工作空间\jser\learn-taro\myApp\node_modules\resolve\lib\async.js:200:13)
at load (C:\工作空间\jser\learn-taro\myApp\node_modules\resolve\lib\async.js:83:43)
at onex (C:\工作空间\jser\learn-taro\myApp\node_modules\resolve\lib\async.js:108:17)
at C:\工作空间\jser\learn-taro\myApp\node_modules\resolve\lib\async.js:12:69
at FSReqWrap.oncomplete (fs.js:152:21) code: 'MODULE_NOT_FOUND' }
编译 所有页面
(node:1264) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'pages' of undefined
at buildPages (C:\工作空间\jser\learn-taro\myApp\node_modules@tarojs\cli\src\weapp.js:609
:27)
at Object.build (C:\工作空间\jser\learn-taro\myApp\node_modules@tarojs\cli\src\weapp.js:1
093:9)
at
(node:1264) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:1264) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@luckyadam
Copy link
Member

应该是这个包没有装好,换成国内源试试

@bboy-xp bboy-xp closed this as completed Jun 18, 2018
@duwei54
Copy link

duwei54 commented Jul 8, 2018

我遇到了同样的问题 报同样的错误 npm 用cnpm替换之后可以跑了

@bboy-xp
Copy link
Author

bboy-xp commented Jul 8, 2018

嗯呢,应该是外网的事,兄弟

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants