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

Template working on localhost but showing some error on server #34

Closed
arpitprod opened this issue Dec 4, 2017 · 3 comments
Closed

Template working on localhost but showing some error on server #34

arpitprod opened this issue Dec 4, 2017 · 3 comments

Comments

@arpitprod
Copy link

arpitprod commented Dec 4, 2017

when I tried to run 'npm install' then showing these logs

`node-sass@4.7.2 install /var/www/nodejs/Admin-Panel/node_modules/node-sass
node scripts/install.js

Unable to save binary /var/www/nodejs/Admin-Panel/node_modules/node-sass/vendor/linux-x64-57 : { Error: EACCES: permission denied, mkdir ‘/var/www/nodejs/Admin-Panel/node_modules/node-sass/vendor’
at Object.fs.mkdirSync (fs.js:885:18)
at sync (/var/www/nodejs/Admin-Panel/node_modules/mkdirp/index.js:71:13)
at Function.sync (/var/www/nodejs/Admin-Panel/node_modules/mkdirp/index.js:77:24)
at checkAndDownloadBinary (/var/www/nodejs/Admin-Panel/node_modules/node-sass/scripts/install.js:111:11)
at Object. (/var/www/nodejs/Admin-Panel/node_modules/node-sass/scripts/install.js:154:1)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
errno: -13,
code: ‘EACCES’,
syscall: ‘mkdir’,
path: ‘/var/www/nodejs/Admin-Panel/node_modules/node-sass/vendor’ }

node-sass@4.7.2 postinstall /var/www/nodejs/Admin-Panel/node_modules/node-sass
node scripts/build.js

Building: /usr/local/bin/node /var/www/nodejs/Admin-Panel/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 ‘/var/www/nodejs/Admin-Panel/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=’,
Build failed with error code: 1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.7.2 postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.7.2 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.`

@arpitprod
Copy link
Author

one more thing, I'm using this template version 1.0.4
https://github.com/mrholek/CoreUI-React/tree/v1.0.4

this is the error log after use this command
sudo npm install

`node-sass@4.7.2 install /var/www/nodejs/Admin-Panel/node_modules/node-sass
node scripts/install.js

Unable to save binary /var/www/nodejs/Admin-Panel/node_modules/node-sass/vendor/linux-x64-57 : { Error: EACCES: permission denied, mkdir ‘/var/www/nodejs/Admin-Panel/node_modules/node-sass/vendor’
at Object.fs.mkdirSync (fs.js:885:18)
at sync (/var/www/nodejs/Admin-Panel/node_modules/mkdirp/index.js:71:13)
at Function.sync (/var/www/nodejs/Admin-Panel/node_modules/mkdirp/index.js:77:24)
at checkAndDownloadBinary (/var/www/nodejs/Admin-Panel/node_modules/node-sass/scripts/install.js:111:11)
at Object. (/var/www/nodejs/Admin-Panel/node_modules/node-sass/scripts/install.js:154:1)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
errno: -13,
code: ‘EACCES’,
syscall: ‘mkdir’,
path: ‘/var/www/nodejs/Admin-Panel/node_modules/node-sass/vendor’ }

node-sass@4.7.2 postinstall /var/www/nodejs/Admin-Panel/node_modules/node-sass
node scripts/build.js

Building: /usr/local/bin/node /var/www/nodejs/Admin-Panel/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 ‘/var/www/nodejs/Admin-Panel/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 node-gyp@3.6.2
gyp info using node@8.9.1 | linux | 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
gyp verb which succeeded python2 /usr/bin/python2
gyp verb check python version /usr/bin/python2 -c "import platform; print(platform.python_version());" returned: “2.7.12\n”
gyp verb get node dir no --target version specified, falling back to host node version: 8.9.1
gyp verb command install [ ‘8.9.1’ ]
gyp verb install input version string “8.9.1"
gyp verb install installing version: 8.9.1
gyp verb install --ensure was passed, so won’t reinstall if already installed
gyp verb install version is already installed, need to check “installVersion”
gyp verb got “installVersion” 9
gyp verb needs “installVersion” 9
gyp verb install version is good
gyp verb get node dir target node version installed: 8.9.1
gyp verb build dir attempting to create “build” dir: /var/www/nodejs/Admin-Panel/node_modules/node-sass/build
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir ‘/var/www/nodejs/Admin-Panel/node_modules/node-sass/build’
gyp ERR! System Linux 4.4.0-62-generic
gyp ERR! command “/usr/local/bin/node” “/var/www/nodejs/Admin-Panel/node_modules/node-gyp/bin/node-gyp.js” “rebuild” “--verbose” “--libsass_ext=” “--libsass_cflags=” “--libsass_ldflags=” “--libsass_library=”
gyp ERR! cwd /var/www/nodejs/Admin-Panel/node_modules/node-sass
gyp ERR! node -v v8.9.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm WARN bootstrap@4.0.0-beta.2 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer dependencies yourself.
npm WARN react-pdf-scroll@0.2.1 requires a peer of react@^15.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-pdf-scroll@0.2.1 requires a peer of react-dom@^15.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.7.2 postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.7.2 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.`

@xidedix
Copy link
Member

xidedix commented Dec 4, 2017

Hi @arpitprod
I am afraid this issue has nothing to do with the template itself.

Unable to save binary /var/www/nodejs/Admin-Panel/node_modules/node-sass/vendor/linux-x64-57 : { Error: EACCES: permission denied, mkdir ‘/var/www/nodejs/Admin-Panel/node_modules/node-sass/vendor’
indicates that you do not have permission to write to the directories that npm uses to store packages.

Please take a look at:

@arpitprod
Copy link
Author

I uninstalled and installed node without sudo and then try
then npm install was working

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

2 participants