Comments (22)
Thank you @achrinza for investigating the issue! I suspect the problem was introduced by #205, where we added sub-packages to deps
where node_modules
folders are created during npm install
time.
I think the fix is to add fix npm configuration so that deps/juggler-{v3,v4}/node_modules
files are not published. In my experience, it's better to use files
entry in package.json
(a white-list of files to include) rather than .npmignore
(a black-list of files to exclude).
After landing the fix, we can publish a new version 3.7.1
.
I think this problem can affect other connectors that are running both juggler v3 and v4 tests.
from loopback-connector-mssql.
Thank you for solving the issue ! @achrinza @dhmlau @bajtos @raymondfeng 🚀
from loopback-connector-mssql.
@nsabourin Thanks for the additional info; I was able to replicate it from my end.
Unfortunately I haven't been able to find a fix for the issue yet.
In the mean time, there's 4 tested 1 recommended workaround:
-
Utilize Yarn 2 -
Use a non-Windows environment -
Downgrade package tov3.6.0
-
Install from source with specific commit-ish
npm i git://github.com/strongloop/loopback-connector-mssql.git#063a7d0342f65011ad427be6f5eae4624d0a6dc3
Regrettably these workarounds require some form of compromise.
Significant updates will continue to be posted here.
Disclaimer
As a community maintainer, I don't speak on behalf of StrongLoop or IBM.
from loopback-connector-mssql.
I was able to replicate the issue with a local install of the 3.7.0
tarball from the NPM registry:
Error logs
C:\Users\rifaa\Documents\testapp>npm i ../../Downloads/loopback-connector-mssql-3.7.0.tgz
npm WARN [email protected] No license field.
npm ERR! code EPERM
npm ERR! syscall rename
npm ERR! path C:\Users\rifaa\Documents\testapp\node_modules\loopback-connector-mssql\node_modules\.adal-node.DELETE\node_modules\@types
npm ERR! dest C:\Users\rifaa\Documents\testapp\node_modules\loopback-connector-mssql\node_modules\adal-node\node_modules\@types
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\rifaa\Documents\testapp\node_modules\loopback-connector-mssql\node_modules\.adal-node.DELETE\node_modules\@types' -> 'C:\Users\rifaa\Documents\testapp\node_modules\loopback-connector-mssql\node_modules\adal-node\node_modules\@types'
npm ERR! [OperationalError: EPERM: operation not permitted, rename 'C:\Users\rifaa\Documents\testapp\node_modules\loopback-connector-mssql\node_modules\.adal-node.DELETE\node_modules\@types' -> 'C:\Users\rifaa\Documents\testapp\node_modules\loopback-connector-mssql\node_modules\adal-node\node_modules\@types'] {
npm ERR! cause: [Error: EPERM: operation not permitted, rename 'C:\Users\rifaa\Documents\testapp\node_modules\loopback-connector-mssql\node_modules\.adal-node.DELETE\node_modules\@types' -> 'C:\Users\rifaa\Documents\testapp\node_modules\loopback-connector-mssql\node_modules\adal-node\node_modules\@types'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'rename',
npm ERR! path: 'C:\\Users\\rifaa\\Documents\\testapp\\node_modules\\loopback-connector-mssql\\node_modules\\.adal-node.DELETE\\node_modules\\@types',
npm ERR! dest: 'C:\\Users\\rifaa\\Documents\\testapp\\node_modules\\loopback-connector-mssql\\node_modules\\adal-node\\node_modules\\@types'
npm ERR! },
npm ERR! stack: "Error: EPERM: operation not permitted, rename 'C:\\Users\\rifaa\\Documents\\testapp\\node_modules\\loopback-connector-mssql\\node_modules\\.adal-node.DELETE\\node_modules\\@types' -> 'C:\\Users\\rifaa\\Documents\\testapp\\node_modules\\loopback-connector-mssql\\node_modules\\adal-node\\node_modules\\@types'",
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'rename',
npm ERR! path: 'C:\\Users\\rifaa\\Documents\\testapp\\node_modules\\loopback-connector-mssql\\node_modules\\.adal-node.DELETE\\node_modules\\@types',
npm ERR! dest: 'C:\\Users\\rifaa\\Documents\\testapp\\node_modules\\loopback-connector-mssql\\node_modules\\adal-node\\node_modules\\@types',
npm ERR! parent: 'loopback-connector-mssql'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\rifaa\AppData\Roaming\npm-cache\_logs\2020-03-05T03_59_42_725Z-debug.log
I tried checking out this repo at commit-ish 063a7d
, and building the tarball with npm pack
.
-
Without running
npm install
beforehand, this results in a working, installable local copy of the package. Nonode_modules
was included in the generated tarball. -
Running
npm install
beforehand results in the exact issue. The samenode_module
s were generated bynpm install
was included.
Unfortunately I'm not involved in the publishing of this package, hence I can only speculate what happened:
npm install
was executed beforenpm publish
for3.7.0
resulting in node_modules being packaged.
A potential remedy is to:
- Publish
3.7.1
with the correct procedure - Un-publish the problematic
3.7.0
from loopback-connector-mssql.
Does npm ci
resolve the issue?
from loopback-connector-mssql.
@achrinza I have the same issue and it doesn't resolve it. it is working version 3.6.0. But, not version 3.7.0
from loopback-connector-mssql.
I ALSO HAVE THE SAME PROBLEM :v
npm WARN npm npm does not support Node.js v13.9.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11, 12.
npm WARN npm You can find the latest version at https://nodejs.org/
npm WARN [email protected] No license field.
npm ERR! path C:\scriptGO\APIs\NODEJS\PRUEBA\ZVentas_API_LoopBack4\zventas-api-loopback4\node_modules\loopback-connector-mssql\node_modules.adal-node.DELETE\node_modules@types
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename
npm ERR! Error: EPERM: operation not permitted, rename 'C:\scriptGO\APIs\NODEJS\PRUEBA\ZVentas_API_LoopBack4\zventas-api-loopback4\node_modules\loopback-connector-mssql\node_modules.adal-node.DELETE\node_modules@types' -> 'C:\scriptGO\APIs\NODEJS\PRUEBA\ZVentas_API_LoopBack4\zventas-api-loopback4\node_modules\loopback-connector-mssql\node_modules\adal-node\node_modules@types'
npm ERR! [OperationalError: EPERM: operation not permitted, rename 'C:\scriptGO\APIs\NODEJS\PRUEBA\ZVentas_API_LoopBack4\zventas-api-loopback4\node_modules\loopback-connector-mssql\node_modules.adal-node.DELETE\node_modules@types' -> 'C:\scriptGO\APIs\NODEJS\PRUEBA\ZVentas_API_LoopBack4\zventas-api-loopback4\node_modules\loopback-connector-mssql\node_modules\adal-node\node_modules@types'] {
npm ERR! cause: [Error: EPERM: operation not permitted, rename 'C:\scriptGO\APIs\NODEJS\PRUEBA\ZVentas_API_LoopBack4\zventas-api-loopback4\node_modules\loopback-connector-mssql\node_modules.adal-node.DELETE\node_modules@types' -> 'C:\scriptGO\APIs\NODEJS\PRUEBA\ZVentas_API_LoopBack4\zventas-api-loopback4\node_modules\loopback-connector-mssql\node_modules\adal-node\node_modules@types']
{
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'rename',
npm ERR! path: 'C:\scriptGO\APIs\NODEJS\PRUEBA\ZVentas_API_LoopBack4\zventas-api-loopback4\node_modules\loopback-connector-mssql\node_modules\.adal-node.DELETE\node_modules\@types',
npm ERR! dest: 'C:\scriptGO\APIs\NODEJS\PRUEBA\ZVentas_API_LoopBack4\zventas-api-loopback4\node_modules\loopback-connector-mssql\node_modules\adal-node\node_modules\@types'
npm ERR! },
npm ERR! stack: "Error: EPERM: operation not permitted, rename 'C:\scriptGO\APIs\NODEJS\PRUEBA\ZVentas_API_LoopBack4\zventas-api-loopback4\node_modules\loopback-connector-mssql\node_modules\.adal-node.DELETE\node_modules\@types' -> 'C:\scriptGO\APIs\NODEJS\PRUEBA\ZVentas_API_LoopBack4\zventas-api-loopback4\node_modules\loopback-connector-mssql\node_modules\adal-node\node_modules\@types'",
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'rename',
npm ERR! path: 'C:\scriptGO\APIs\NODEJS\PRUEBA\ZVentas_API_LoopBack4\zventas-api-loopback4\node_modules\loopback-connector-mssql\node_modules\.adal-node.DELETE\node_modules\@types',
npm ERR! dest: 'C:\scriptGO\APIs\NODEJS\PRUEBA\ZVentas_API_LoopBack4\zventas-api-loopback4\node_modules\loopback-connector-mssql\node_modules\adal-node\node_modules\@types',
npm ERR! parent: 'loopback-connector-mssql'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\lbalarezo\AppData\Roaming\npm-cache_logs\2020-03-03T21_55_00_559Z-debug.log
from loopback-connector-mssql.
@nsabourin @LuiguiBalarezo Thanks for the feedback, we'll look into this where possible.
Disclaimer
As a community maintainer, I don't speak on behalf of StrongLoop or IBM.
from loopback-connector-mssql.
Same here
c:\test>npm install loopback-connector-mssql --save
npm WARN enoent ENOENT: no such file or directory, open 'c:\test\package.json'
npm WARN test No description
npm WARN test No repository field.
npm WARN test No README data
npm WARN test No license field.
npm ERR! code EPERM
npm ERR! syscall rename
npm ERR! path c:\test\node_modules\loopback-connector-mssql\node_modules\.adal-node.DELETE\node_modules\@types
npm ERR! dest c:\test\node_modules\loopback-connector-mssql\node_modules\adal-node\node_modules\@types
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, rename 'c:\test\node_modules\loopback-connector-mssql\node_modules\.adal-node.DELETE\node_modules\@types' -> 'c:\test\node_modules\loopback-connector-mssql\node_modules\adal-node\node_modules\@types'
npm ERR! [OperationalError: EPERM: operation not permitted, rename 'c:\test\node_modules\loopback-connector-mssql\node_modules\.adal-node.DELETE\node_modules\@types' -> 'c:\test\node_modules\loopback-connector-mssql\node_modules\adal-node\node_modules\@types'] {
npm ERR! cause: [Error: EPERM: operation not permitted, rename 'c:\test\node_modules\loopback-connector-mssql\node_modules\.adal-node.DELETE\node_modules\@types' -> 'c:\test\node_modules\loopback-connector-mssql\node_modules\adal-node\node_modules\@types'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'rename',
npm ERR! path: 'c:\\test\\node_modules\\loopback-connector-mssql\\node_modules\\.adal-node.DELETE\\node_modules\\@types',
npm ERR! dest: 'c:\\test\\node_modules\\loopback-connector-mssql\\node_modules\\adal-node\\node_modules\\@types'
npm ERR! },
npm ERR! stack: "Error: EPERM: operation not permitted, rename 'c:\\test\\node_modules\\loopback-connector-mssql\\node_modules\\.adal-node.DELETE\\node_modules\\@types' -> 'c:\\test\\node_modules\\loopback-connector-mssql\\node_modules\\adal-node\\node_modules\\@types'",
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'rename',
npm ERR! path: 'c:\\test\\node_modules\\loopback-connector-mssql\\node_modules\\.adal-node.DELETE\\node_modules\\@types',
npm ERR! dest: 'c:\\test\\node_modules\\loopback-connector-mssql\\node_modules\\adal-node\\node_modules\\@types',
npm ERR! parent: 'loopback-connector-mssql'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrateur.WIN-EBQ49A4LTJ1\AppData\Roaming\npm-cache\_logs\2020-03-04T10_11_53_942Z-debug.log
c:\test>
c:\test>npm install loopback-connector-mssql --save
from loopback-connector-mssql.
@stephaneerard Thanks for providing error logs
From my findings from running npm i loopback-connector-mssql
:
-
Error replicate-able on Windows,
Error
rifaa@LAPTOP-DHVDTT1Q MINGW64 ~/Documents/test-app $ npm install loopback-connector-mssql npm WARN [email protected] No license field. npm ERR! code EPERM npm ERR! syscall rename npm ERR! path C:\Users\rifaa\Documents\test-app\node_modules\loopback-connector-mssql\node_modules\.adal-node.DELETE\node_modules\@types npm ERR! dest C:\Users\rifaa\Documents\test-app\node_modules\loopback-connector-mssql\node_modules\adal-node\node_modules\@types npm ERR! errno -4048 npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\rifaa\Documents\test-app\node_modules\loopback-connector-mssql\node_modules\.adal-node.DELETE\node_modules\@types' -> 'C:\Users\rifaa\Documents\test-app\node_modules\loopback-connector-mssql\node_modules\adal-node\node_modules\@types' npm ERR! [OperationalError: EPERM: operation not permitted, rename 'C:\Users\rifaa\Documents\test-app\node_modules\loopback-connector-mssql\node_modules\.adal-node.DELETE\node_modules\@types' -> 'C:\Users\rifaa\Documents\test-app\node_modules\loopback-connector-mssql\node_modules\adal-node\node_modules\@types'] { npm ERR! cause: [Error: EPERM: operation not permitted, rename 'C:\Users\rifaa\Documents\test-app\node_modules\loopback-connector-mssql\node_modules\.adal-node.DELETE\node_modules\@types' -> 'C:\Users\rifaa\Documents\test-app\node_modules\loopback-connector-mssql\node_modules\adal-node\node_modules\@types'] { npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'rename', npm ERR! path: 'C:\\Users\\rifaa\\Documents\\test-app\\node_modules\\loopback-connector-mssql\\node_modules\\.adal-node.DELETE\\node_modules\\@types', npm ERR! dest: 'C:\\Users\\rifaa\\Documents\\test-app\\node_modules\\loopback-connector-mssql\\node_modules\\adal-node\\node_modules\\@types' npm ERR! }, npm ERR! stack: "Error: EPERM: operation not permitted, rename 'C:\\Users\\rifaa\\Documents\\test-app\\node_modules\\loopback-connector-mssql\\node_modules\\.adal-node.DELETE\\node_modules\\@types' -> 'C:\\Users\\rifaa\\Documents\\test-app\\node_modules\\loopback-connector-mssql\\node_modules\\adal-node\\node_modules\\@types'", npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'rename', npm ERR! path: 'C:\\Users\\rifaa\\Documents\\test-app\\node_modules\\loopback-connector-mssql\\node_modules\\.adal-node.DELETE\\node_modules\\@types', npm ERR! dest: 'C:\\Users\\rifaa\\Documents\\test-app\\node_modules\\loopback-connector-mssql\\node_modules\\adal-node\\node_modules\\@types', npm ERR! parent: 'loopback-connector-mssql' npm ERR! } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It's possible that the file was already in use (by a text editor or antivirus), npm ERR! or that you lack permissions to access it. npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\rifaa\AppData\Roaming\npm-cache\_logs\2020-03-04T10_25_19_627Z-debug.log
-
Ubuntu 18.04 LTS (via WSLv1) works fine (no error).
I also noticed there's no package-lock.json
.
Between v3.6
and v3.7
, there was no change in direct dependencies.
/cc @bajtos @raymondfeng
from loopback-connector-mssql.
Running npm install [email protected] works fine
from loopback-connector-mssql.
@achrinza
When I add manually version 3.6.0 in package.json and run npm install
it doesn't work (same EPERM error as 3.7.0). But, npm install [email protected]
work's fine as @stephaneerard mentioned. Maybe this detail could help to solve the problem ?
from loopback-connector-mssql.
Another workaround is available:
-
Install from source with the
3.7.0
commit-ishnpm i git://github.com/strongloop/loopback-connector-mssql.git#063a7d0342f65011ad427be6f5eae4624d0a6dc3
My previous comment above has been updated to reflect this.
from loopback-connector-mssql.
Some findings:
-
In
3.7.0
,node_modules
was published to the NPM registry. -
In
3.6.0
,node_modules
was not published to the NPM registry.
and
-
In
3.7.0
,deps/juggler-v3/node_modules
was published.deps/juggler-v4/node_modules
was not published. -
In
3.6.0
, neither of thosenode_modules
were published.
I'm not too sure why there was this change in behaviour, as there wasn't any change in direct dependencies.
No node_modules
were published to this GitHub repository either.
from loopback-connector-mssql.
If you look at loopback-connector-postgresql's .gitignore
file, we have an entry to ignore all node_modules
directories, see https://github.com/strongloop/loopback-connector-postgresql/blob/master/.gitignore
We use slt-release
from https://github.com/strongloop/strong-tools to generate a changelog, create the release commit & tag, etc. This tool is creating an .npmrc
file based on .gitignore
file, adding few more entries that are often desired to ignore by npm
but not by git
.
In this repository, we have the following .gitignore
entry:
I suspect it's either not honored by npm
or the person publishing a new version of this connector did not use slt-release
.
from loopback-connector-mssql.
Opened a PR to fix the problem, PTAL: #225
from loopback-connector-mssql.
It might have something to do with https://github.com/strongloop/loopback-connector-mssql/blob/master/package.json#L46. We had this in the past as https://github.com/facebook/regenerator/tree/master/packages/regenerator-runtime was under a restrictive license and now it's under MIT. Let's remove the prepublish script to see if it helps.
from loopback-connector-mssql.
BTW, we can use npm pack
to verify if node_modules
are included.
from loopback-connector-mssql.
BTW, we can use
npm pack
to verify ifnode_modules
are included.
Correct, @bajtos mentions the steps in #225 . :)
from loopback-connector-mssql.
Linked PR #226
from loopback-connector-mssql.
Probably the root cause: npm/cli#417
Should we close the issue now that the PR has been merged?
from loopback-connector-mssql.
Closing as resolved.
@Dayof, if you still encounter this issue, please feel free to open a new issue. Thanks!
cc @emonddr
from loopback-connector-mssql.
Related Issues (20)
- tedious type deprecation messages in console HOT 2
- query the table using rowversion HOT 2
- AutoUpdate needs to have order when executing index related operations HOT 2
- Loopback 4 relations compatibility HOT 15
- applyPagination is missing the ORDER BY clause when supportsOffsetFetch HOT 2
- loopback 4 model options not working for mssql HOT 5
- MsSQL not exported in loopback-connector-mssql HOT 7
- Incorrect Table Relations Discovery HOT 5
- Relations not working in loopback 4 using mysql database How to solve it HOT 3
- Run shared tests from both v3 and v4 of juggler
- Transaction not working in Loopback 4. HOT 2
- New release? HOT 2
- Loopback 4 Transaction returning undefined. HOT 8
- EPERM on version 3.7.0
- executeSql should return mssql results HOT 5
- Loopback 4 can not parsing javascript Date Object to native SQL statement which require Date parameter HOT 1
- migrate script not supports custom column names
- Having CVE in the current version. can you please update to latest version of mssql and loopback-connector HOT 1
- Like operator not working when trying to fetch stringify array of objects or object
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loopback-connector-mssql.