0

I have a problem to configure the connection beetween Azure Mysql and Node + Sequelize. Could be the node version the problem? This is the error that I receive during the deploy:

Error:

remote: npm ERR! Error: ENOENT, chmod 'D:\home\site\wwwroot\node_modules\sequelize\node_modules\moment\locale\ar-ly.js'
remote: npm ERR! If you need help, you may report this *entire* log,
remote: npm ERR! including the npm and node versions, at:
remote: npm ERR!     <http://github.com/npm/npm/issues>
remote: 
remote: npm ERR! System Windows_NT 6.2.9200
remote: npm ERR! command "D:\\Program Files (x86)\\nodejs\\0.10.28\\node.exe" "D:\\Program Files (x86)\\npm\\1.4.9\\node_modules\\npm\\bin\\npm-cli.js" "install" "--production"
remote: npm ERR! cwd D:\home\site\wwwroot
remote: npm ERR! node -v v0.10.28
remote: npm ERR! npm -v 1.4.9
remote: npm ERR! path D:\home\site\wwwroot\node_modules\sequelize\node_modules\moment\locale\ar-ly.js
remote: npm ERR! fstream_path D:\home\site\wwwroot\node_modules\sequelize\node_modules\moment\locale\ar-ly.js
remote: npm ERR! fstream_type File
remote: npm ERR! fstream_class FileWriter
remote: npm ERR! fstream_finish_call chmod
remote: npm ERR! code ENOENT
remote: npm ERR! errno 34
remote: npm ERR! fstream_stack D:\Program Files (x86)\npm\1.4.9\node_modules\npm\node_modules\fstream\lib\writer.js:305:19
remote: npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
remote: npm ERR! Error: EPERM, lstat 'D:\home\site\wwwroot\node_modules\sequelize\node_modules\lodash\_createOver.js'
remote: npm ERR!  { [Error: EPERM, lstat 'D:\home\site\wwwroot\node_modules\sequelize\node_modules\lodash\_createOver.js']
remote: npm ERR!   errno: 50,
remote: npm ERR!   code: 'EPERM',
remote: npm ERR!   path: 'D:\\home\\site\\wwwroot\\node_modules\\sequelize\\node_modules\\lodash\\_createOver.js',
remote: npm ERR!   fstream_type: 'File',
remote: npm ERR!   fstream_path: 'D:\\home\\site\\wwwroot\\node_modules\\sequelize\\node_modules\\lodash\\_createOver.js',
remote: npm ERR!   fstream_class: 'FileWriter',
remote: npm ERR!   fstream_stack: 
remote: npm ERR!    [ 'D:\\Program Files (x86)\\npm\\1.4.9\\node_modules\\npm\\node_modules\\fstream\\lib\\writer.js:284:26',
remote: npm ERR!      'Object.oncomplete (fs.js:107:15)' ] }
remote: npm ERR! 
remote: npm ERR! Please try running this command again as root/Administrator.
remote: 
remote: npm ERR! System Windows_NT 6.2.9200
remote: npm ERR! command "D:\\Program Files (x86)\\nodejs\\0.10.28\\node.exe" "D:\\Program Files (x86)\\npm\\1.4.9\\node_modules\\npm\\bin\\npm-cli.js" "install" "--production"
remote: npm ERR! cwd D:\home\site\wwwroot
remote: npm ERR! node -v v0.10.28
remote: npm ERR! npm -v 1.4.9
remote: npm ERR! path D:\home\site\wwwroot\node_modules\sequelize\node_modules\lodash\_createOver.js
remote: npm ERR! fstream_path D:\home\site\wwwroot\node_modules\sequelize\node_modules\lodash\_createOver.js
remote: npm ERR! fstream_type File
remote: npm ERR! fstream_class FileWriter
remote: npm ERR! code EPERM
remote: npm ERR! errno 50
remote: npm ERR! stack Error: EPERM, lstat 'D:\home\site\wwwroot\node_modules\sequelize\node_modules\lodash\_createOver.js'
remote: Failed exitCode=34, command="D:\Program Files (x86)\nodejs\0.10.28\node.exe" "D:\Program Files (x86)\npm\1.4.9\node_modules\npm\bin\npm-cli.js" install --production
remote: npm ERR! fstream_stack D:\Program Files (x86)\npm\1.4.9\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
remote: An error has occurred during web site deployment.
remote: npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
remote: npm ERR! error rolling back Error: EPERM, unlink 'D:\home\site\wwwroot\node_modules\sequelize\node_modules\moment-timezone\builds\moment-timezone-with-data-2012-2022.min.js'
remote: npm ERR! error rolling back  [email protected] { [Error: EPERM, unlink 'D:\home\site\wwwroot\node_modules\sequelize\node_modules\moment-timezone\builds\moment-timezone-with-data-2012-2022.min.js']
remote: npm ERR! error rolling back   errno: 50,
remote: npm ERR! error rolling back   code: 'EPERM',
remote: npm ERR! error rolling back   path: 'D:\\home\\site\\wwwroot\\node_modules\\sequelize\\node_modules\\moment-timezone\\builds\\moment-timezone-with-data-2012-2022.min.js' }

This is the code regarding the connection:

var sequelize = new Sequelize('db-name', 'user', 'password', {
  host: 'dbname.database.windows.net',
  dialect: 'mssql',
  pool: {
    max: 5,
    min: 0,
    idle: 10000
  },
  dialectOptions: {
    encrypt: true
  }
});

1 Answer 1

1

I'm facing the same problem with this configuration (Web App Service + NodeJS + Sequelize + MySQL). It looks like the problem is the node version on the windows machine.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.