Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 57a5306

Browse filesBrowse files
author
Ben Newman
committed
Use npm dedupe instead of npm@3 on Windows.
We have to use the same version of npm that comes with Node in order for node-gyp to succeed in downloading the necessary v8 libraries.
1 parent 297447a commit 57a5306
Copy full SHA for 57a5306

File tree

Expand file treeCollapse file tree

1 file changed

+2
-18
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-18
lines changed

‎scripts/generate-dev-bundle.ps1

Copy file name to clipboardExpand all lines: scripts/generate-dev-bundle.ps1
+2-18Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -77,21 +77,6 @@ rm -Recurse -Force "${DIR}\bin\node_modules"
7777
copy "${CHECKOUT_DIR}\scripts\npm.cmd" "${DIR}\bin\npm.cmd"
7878
npm version
7979

80-
mkdir "${DIR}\bin\npm3"
81-
cd "${DIR}\bin\npm3"
82-
echo "{}" | Out-File package.json -Encoding ascii # otherwise it doesn't install in local dir
83-
npm install npm@3.1.2
84-
85-
# add bin\npm3 to the front of the path so we can use npm 3 for building
86-
$env:PATH = "${DIR}\bin\npm3;${env:PATH}"
87-
88-
# npm depends on a hardcoded file path to node-gyp, so we need this to be
89-
# un-flattened
90-
cd node_modules\npm
91-
npm install node-gyp
92-
cd ..\..
93-
cp node_modules\npm\bin\npm.cmd
94-
9580
# install dev-bundle-package.json
9681
# use short folder names
9782
# b for build
@@ -101,6 +86,7 @@ cd "$DIR\b\t"
10186
npm config set loglevel error
10287
node "${CHECKOUT_DIR}\scripts\dev-bundle-server-package.js" | Out-File -FilePath package.json -Encoding ascii
10388
npm install
89+
npm dedupe
10490
npm shrinkwrap
10591

10692
mkdir -Force "${DIR}\server-lib\node_modules"
@@ -114,6 +100,7 @@ mkdir -Force "${DIR}\b\p"
114100
cd "${DIR}\b\p"
115101
node "${CHECKOUT_DIR}\scripts\dev-bundle-tool-package.js" | Out-File -FilePath package.json -Encoding ascii
116102
npm install
103+
npm dedupe
117104
cmd /c robocopy "${DIR}\b\p\node_modules" "${DIR}\lib\node_modules" /e /nfl /ndl
118105
cd "$DIR"
119106
cmd /c rmdir "${DIR}\b" /s /q
@@ -144,9 +131,6 @@ cp "$DIR\mongodb\$mongo_name\bin\mongo.exe" $DIR\mongodb\bin
144131
rm -Recurse -Force $mongo_zip
145132
rm -Recurse -Force "$DIR\mongodb\$mongo_name"
146133

147-
# Remove npm 3 before we package the dev bundle
148-
rm -Recurse -Force "${DIR}\bin\npm3"
149-
150134
rm -Recurse -Force "$py_msi"
151135
python --version
152136

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.