You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by "damienf55 (via GitHub)" <gi...@apache.org> on 2023/03/02 07:54:26 UTC

[GitHub] [cordova] damienf55 opened a new issue, #384: Cordova create testProject on smb volume

damienf55 opened a new issue, #384:
URL: https://github.com/apache/cordova/issues/384

   Hi Cordova team
   
   When I create a new project on my Macintosh (OS Monterey) on smb volume with full rights for me, there are an error :
   
   cordova create MyProject :
   
   Creating a new cordova project.
   EACCES: permission denied, copyfile '/usr/local/lib/node_modules/cordova/node_modules/cordova-app-hello-world/template_src/config.xml' -> '/Volumes/furiet5/cordovaTest/config.xml'
   
   I'have no error with in a foder localy on my Macintosh
   
   Thank you for help me


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova] damienf55 commented on issue #384: Cordova create testProject on smb volume

Posted by "damienf55 (via GitHub)" <gi...@apache.org>.
damienf55 commented on issue #384:
URL: https://github.com/apache/cordova/issues/384#issuecomment-1451471571

   with verbose mode :
   
   Using detached cordova-create
   Creating a new cordova project.
   Copying assets.
   EACCES: permission denied, copyfile '/usr/local/lib/node_modules/cordova/node_modules/cordova-app-hello-world/template_src/config.xml' -> '/Volumes/furiet5/cordovaTest/config.xml'
   Error: EACCES: permission denied, copyfile '/usr/local/lib/node_modules/cordova/node_modules/cordova-app-hello-world/template_src/config.xml' -> '/Volumes/furiet5/cordovaTest/config.xml'
       at Object.copyFileSync (node:fs:2817:3)
       at copyFile (/usr/local/lib/node_modules/cordova/node_modules/fs-extra/lib/copy/copy-sync.js:73:6)
       at onFile (/usr/local/lib/node_modules/cordova/node_modules/fs-extra/lib/copy/copy-sync.js:59:25)
       at getStats (/usr/local/lib/node_modules/cordova/node_modules/fs-extra/lib/copy/copy-sync.js:51:44)
       at startCopy (/usr/local/lib/node_modules/cordova/node_modules/fs-extra/lib/copy/copy-sync.js:41:10)
       at copyDirItem (/usr/local/lib/node_modules/cordova/node_modules/fs-extra/lib/copy/copy-sync.js:125:10)
       at /usr/local/lib/node_modules/cordova/node_modules/fs-extra/lib/copy/copy-sync.js:118:39
       at Array.forEach (<anonymous>)
       at copyDir (/usr/local/lib/node_modules/cordova/node_modules/fs-extra/lib/copy/copy-sync.js:118:23)
       at onDir (/usr/local/lib/node_modules/cordova/node_modules/fs-extra/lib/copy/copy-sync.js:108:10)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova] damienf55 commented on issue #384: Cordova create testProject on smb volume

Posted by "damienf55 (via GitHub)" <gi...@apache.org>.
damienf55 commented on issue #384:
URL: https://github.com/apache/cordova/issues/384#issuecomment-1506822171

   Ok, thank-you for helping. I will check that later
   Bye
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova] damienf55 closed issue #384: Cordova create testProject on smb volume

Posted by "damienf55 (via GitHub)" <gi...@apache.org>.
damienf55 closed issue #384: Cordova create testProject on smb volume
URL: https://github.com/apache/cordova/issues/384


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova] breautek commented on issue #384: Cordova create testProject on smb volume

Posted by "breautek (via GitHub)" <gi...@apache.org>.
breautek commented on issue #384:
URL: https://github.com/apache/cordova/issues/384#issuecomment-1506747916

   > Do you have a doc to install cordova with `nvm' ?
   
   No, the cordova docs just has a brief mention regarding nvm. This should still work on a multi-user machine, but NVM will only be installed for your user. If this is a multi-user university machine however, and all users should have access to Node, then NVM might not be the best option.
   
   NVM is just a node manager so you can then install different versions of node at the user-level. For example, if you want to use Node 16 by default, then you would do:
   
   ```
   nvm install 16
   nvm alias default 16
   ```
   
   You can have multiple versions installed at the same time and switch between them (every Node install have their own global packages folder)
   
   ```
   nvm install 18
   nvm use 18
   # now node/npm references are using Node 18 for the active session, but a new terminal will still 16 as the default as configured above
   ```
   
   Because Node is user level, you don't need `root` or `sudo` to install global packages because they get installed at a user-level directory (inside `~/.nvm`). e.g. you can run `npm install -g cordova`
   
   > I cant install cordova for all students
   
   NVM is a user-level (shell) program, it won't be installed for all students. Any node versions installed through NVM is also user-level install, only your user has access to it.
   
   Additionally because of this, you can now use `npm install -g <package>` without using `root` or `sudo` because these packages are installed under a nvm user-level directory. For example:
   
   ```
   $ which node
   /home/norman/.nvm/versions/node/v18.15.0/bin/node
   $ which cordova
   /home/norman/.nvm/versions/node/v18.15.0/bin/cordova
   ```
   
   To install NVM, see their [installation](https://github.com/nvm-sh/nvm#installing-and-updating)
   
   If you don't want to use NVM, it is also possible to configure NPM to not use a system directory which requires `root` by setting the [prefix](https://docs.npmjs.com/cli/v9/commands/npm-prefix?v=true) option. This config can be set to a user directory such as `~/.npm-globals` so that when you install global packages, it won't require `sudo`. But it sounds like you want a local user node install, not a system wide node install, so using NVM would be a way to achieve that.
   
   From a security standpoint, using NVM or at least configuring NPM to not use `root` owned directories is beneficial because it means you don't need to use `sudo` when installing. The drawback of requiring `sudo` is that you're giving many packages `root` level privileges during the installation, so you're making your self vulnerable to malicious packages that could do wide harm to the machine in general while running under root.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova] breautek commented on issue #384: Cordova create testProject on smb volume

Posted by "breautek (via GitHub)" <gi...@apache.org>.
breautek commented on issue #384:
URL: https://github.com/apache/cordova/issues/384#issuecomment-1505847054

   '/usr/local/lib/`
   
   is generally a path reserved for root, and is what I think is likely the source of the permission issue. Cordova is likely have been installed root (e.g. `sudo npm install -g cordova`) which isn't recommended, as it means cordova will need to be root in order to copy files from node_modules and do most of it's operations.
   
   Instead, NPM should be [configured](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally#manually-change-npms-default-directory) to use a global directory owned by your own user account, so you can use NPM to install packages globally without using `sudo`.
   
   Personally, I'd recommend using [nvm](https://github.com/nvm-sh/nvm) (Node Version Manager) which installs local versions of a node at a version your choice. You could have multiple versions installed and easily switch between them, and it configures things in a way by default where you don't need `sudo`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova] damienf55 commented on issue #384: Cordova create testProject on smb volume

Posted by "damienf55 (via GitHub)" <gi...@apache.org>.
damienf55 commented on issue #384:
URL: https://github.com/apache/cordova/issues/384#issuecomment-1506462762

   Hi, cordova is installed for all users, so I use `sudo npm install -g cordova`. My computers are multi-users for courses of our University ... I cant install cordova for all students... Do you have a doc to install cordova with `nvm' ?
   
   Thanks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org