vendredi 3 janvier 2020

New Ember.js app in shared folder of VMware Ubuntu guest

I am trying to develop an Ember.js app in VMware. The scenario is the following:

  • Host: Windows 7 Pro.
  • Guest: Ubuntu Server 18.04.

After installation of Ember.js, "ember -v" returns:

ember-cli: 3.15.1
node: 12.14.0
os: linux x64

If i try to create a new Ember app from my home directory there is no problem but, as I want to edit files from Windows host OS, when I try to do the same (ember new app_name) in the shared folder (/mnt/hgfs/folder_name/) an error is thrown:

Error creating new application. Removing generated directory `./app_name`
Command failed: npm install --loglevel error
npm WARN deprecated core-js@2.4.1: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated exists-sync@0.0.4: Please replace with usage of fs.existsSync
npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path /mnt/hgfs/folder_name/app_name/node_modules/.acorn-dynamic-import.DELETE/node_modules/acorn
npm ERR! dest /mnt/hgfs/folder_name/app_name/node_modules/acorn-dynamic-import/node_modules/acorn
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, rename '/mnt/hgfs/folder_name/app_name/node_modules/.acorn-dynamic-import.DELETE/node_modules/acorn' -> '/mnt/hgfs/folder_name/app_name/node_modules/acorn-dynamic-import/node_modules/acorn'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/user/.npm/_logs/2020-01-03T21_43_21_623Z-debug.log


Stack Trace and Error Report: /tmp/error.dump.1e44562d410bb23303e1023cf42f30f8.log

I tried the following solution from https://docs.npmjs.com/getting-started/fixing-npm-permissions

# Make a directory for global installations:
mkdir ~/.npm-global

# Configure npm to use the new directory path:
npm config set prefix '~/.npm-global'

#Open or create a ~/.profile file and add this line:
export PATH=~/.npm-global/bin:$PATH

#Back on the command line, update your system variables:
source ~/.profile

But no success.

Any help would be appreciated to solve this issue.




Aucun commentaire:

Enregistrer un commentaire